• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Instruction类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.org.apache.bcel.internal.generic.Instruction的典型用法代码示例。如果您正苦于以下问题:Java Instruction类的具体用法?Java Instruction怎么用?Java Instruction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Instruction类属于com.sun.org.apache.bcel.internal.generic包,在下文中一共展示了Instruction类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: loadLocal

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
/**
 * Helper method to generate an instance of a subclass of
 * {@link LoadInstruction} based on the specified {@link Type} that will
 * load the specified local variable
 * @param index the JVM stack frame index of the variable that is to be
 * loaded
 * @param type the {@link Type} of the variable
 * @return the generated {@link LoadInstruction}
 */
private static Instruction loadLocal(int index, Type type) {
    if (type == Type.BOOLEAN) {
       return new ILOAD(index);
    } else if (type == Type.INT) {
       return new ILOAD(index);
    } else if (type == Type.SHORT) {
       return new ILOAD(index);
    } else if (type == Type.LONG) {
       return new LLOAD(index);
    } else if (type == Type.BYTE) {
       return new ILOAD(index);
    } else if (type == Type.CHAR) {
       return new ILOAD(index);
    } else if (type == Type.FLOAT) {
       return new FLOAD(index);
    } else if (type == Type.DOUBLE) {
       return new DLOAD(index);
    } else {
       return new ALOAD(index);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:MethodGenerator.java


示例2: storeLocal

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
/**
 * Helper method to generate an instance of a subclass of
 * {@link StoreInstruction} based on the specified {@link Type} that will
 * store a value in the specified local variable
 * @param index the JVM stack frame index of the variable that is to be
 * stored
 * @param type the {@link Type} of the variable
 * @return the generated {@link StoredInstruction}
 */
private static Instruction storeLocal(int index, Type type) {
    if (type == Type.BOOLEAN) {
       return new ISTORE(index);
    } else if (type == Type.INT) {
       return new ISTORE(index);
    } else if (type == Type.SHORT) {
       return new ISTORE(index);
    } else if (type == Type.LONG) {
       return new LSTORE(index);
    } else if (type == Type.BYTE) {
       return new ISTORE(index);
    } else if (type == Type.CHAR) {
       return new ISTORE(index);
    } else if (type == Type.FLOAT) {
       return new FSTORE(index);
    } else if (type == Type.DOUBLE) {
       return new DSTORE(index);
    } else {
       return new ASTORE(index);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:MethodGenerator.java


示例3: storeInstruction

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
/**
 * Returns an instruction for storing a value from the JVM stack
 * into this variable.
 */
public Instruction storeInstruction() {
    final Instruction instr = _storeInstruction;
    if (_storeInstruction == null) {
        _storeInstruction = _type.STORE(_local.getIndex());
    }
    return _storeInstruction;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:VariableBase.java


示例4: visitInstruction

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
private boolean visitInstruction( final Instruction i ) {
    final short opcode = i.getOpcode();
    if ((InstructionConst.getInstruction(opcode) != null)
            && !(i instanceof ConstantPushInstruction) && !(i instanceof ReturnInstruction)) { // Handled below
        _out.println("il.append(InstructionConst."
                + i.getName().toUpperCase(Locale.ENGLISH) + ");");
        return true;
    }
    return false;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:BCELFactory.java


示例5: loadInstruction

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
/**
 * Returns an instruction for loading the value of this variable onto
 * the JVM stack.
 */
public Instruction loadInstruction() {
    if (_loadInstruction == null) {
        _loadInstruction = _type.LOAD(_local.getIndex());
    }
    return _loadInstruction;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:VariableBase.java


示例6: SUB

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction SUB() {
    return InstructionConst.DSUB;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:RealType.java


示例7: setLoadInstruction

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
/**
 * Set the instruction for loading the value of this variable onto the
 * JVM stack and returns the old instruction.
 */
public Instruction setLoadInstruction(Instruction instruction) {
    Instruction tmp = _loadInstruction;
    _loadInstruction = instruction;
    return tmp;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:Param.java


示例8: setStoreInstruction

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
/**
 * Set the instruction for storing a value from the stack into this
 * variable and returns the old instruction.
 */
public Instruction setStoreInstruction(Instruction instruction) {
    Instruction tmp = _storeInstruction;
    _storeInstruction = instruction;
    return tmp;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:Param.java


示例9: STORE

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction STORE(int slot) {
    return new ASTORE(slot);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:StringType.java


示例10: POP

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction POP() {
    return NOP;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:VoidType.java


示例11: ADD

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction ADD() {
    return InstructionConstants.IADD;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:IntType.java


示例12: MUL

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction MUL() {
    return null;            // should never be called
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:Type.java


示例13: STORE

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction STORE(int slot) {
    return new DSTORE(slot);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:RealType.java


示例14: REM

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction REM() {
    return InstructionConstants.IREM;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:IntType.java


示例15: NEG

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction NEG() {
    return InstructionConstants.INEG;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:IntType.java


示例16: storeContextNode

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction storeContextNode() {
    return storeCurrentNode();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:MethodGenerator.java


示例17: loadParameter

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction loadParameter(int index) {
    return new ALOAD(index + PARAM_START_INDEX);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:AttributeSetMethodGenerator.java


示例18: storeParameter

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction storeParameter(int index) {
    return new ASTORE(index + PARAM_START_INDEX);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:AttributeSetMethodGenerator.java


示例19: LOAD

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction LOAD(int slot) {
    return new ALOAD(slot);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:ObjectType.java


示例20: ADD

import com.sun.org.apache.bcel.internal.generic.Instruction; //导入依赖的package包/类
public Instruction ADD() {
    return InstructionConstants.DADD;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:RealType.java



注:本文中的com.sun.org.apache.bcel.internal.generic.Instruction类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SleepInputFormat类代码示例发布时间:2022-05-23
下一篇:
Java UserIdCause类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap