本文整理汇总了Java中com.sun.org.apache.bcel.internal.generic.ILOAD类的典型用法代码示例。如果您正苦于以下问题:Java ILOAD类的具体用法?Java ILOAD怎么用?Java ILOAD使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ILOAD类属于com.sun.org.apache.bcel.internal.generic包,在下文中一共展示了ILOAD类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: compileDefaultRecursion
import com.sun.org.apache.bcel.internal.generic.ILOAD; //导入依赖的package包/类
/**
* Compiles the default handling for DOM elements: traverse all children
*/
private InstructionList compileDefaultRecursion(ClassGenerator classGen,
MethodGenerator methodGen,
InstructionHandle next) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = new InstructionList();
final String applyTemplatesSig = classGen.getApplyTemplatesSig();
final int git = cpg.addInterfaceMethodref(DOM_INTF,
GET_CHILDREN,
GET_CHILDREN_SIG);
final int applyTemplates = cpg.addMethodref(getClassName(),
functionName(),
applyTemplatesSig);
il.append(classGen.loadTranslet());
il.append(methodGen.loadDOM());
il.append(methodGen.loadDOM());
il.append(new ILOAD(_currentIndex));
il.append(new INVOKEINTERFACE(git, 2));
il.append(methodGen.loadHandler());
il.append(new INVOKEVIRTUAL(applyTemplates));
il.append(new GOTO_W(next));
return il;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:Mode.java
示例2: compileDefaultText
import com.sun.org.apache.bcel.internal.generic.ILOAD; //导入依赖的package包/类
/**
* Compiles the default action for DOM text nodes and attribute nodes:
* output the node's text value
*/
private InstructionList compileDefaultText(ClassGenerator classGen,
MethodGenerator methodGen,
InstructionHandle next) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = new InstructionList();
final int chars = cpg.addInterfaceMethodref(DOM_INTF,
CHARACTERS,
CHARACTERS_SIG);
il.append(methodGen.loadDOM());
il.append(new ILOAD(_currentIndex));
il.append(methodGen.loadHandler());
il.append(new INVOKEINTERFACE(chars, 3));
il.append(new GOTO_W(next));
return il;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:Mode.java
示例3: translate
import com.sun.org.apache.bcel.internal.generic.ILOAD; //导入依赖的package包/类
/**
* This method is called when the constructor is compiled in
* Stylesheet.compileConstructor() and not as the syntax tree is traversed.
*/
public void translate(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
final int tst = cpg.addMethodref(BASIS_LIBRARY_CLASS,
"testLanguage",
"("+STRING_SIG+DOM_INTF_SIG+"I)Z");
_lang.translate(classGen,methodGen);
il.append(methodGen.loadDOM());
if (classGen instanceof FilterGenerator)
il.append(new ILOAD(1));
else
il.append(methodGen.loadContextNode());
il.append(new INVOKESTATIC(tst));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:LangCall.java
示例4: translate
import com.sun.org.apache.bcel.internal.generic.ILOAD; //导入依赖的package包/类
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final InstructionList il = methodGen.getInstructionList();
if (methodGen instanceof CompareGenerator) {
il.append(((CompareGenerator)methodGen).loadLastNode());
}
else if (methodGen instanceof TestGenerator) {
il.append(new ILOAD(LAST_INDEX));
}
else {
final ConstantPoolGen cpg = classGen.getConstantPool();
final int getLast = cpg.addInterfaceMethodref(NODE_ITERATOR,
"getLast",
"()I");
il.append(methodGen.loadIterator());
il.append(new INVOKEINTERFACE(getLast, 1));
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:LastCall.java
示例5: translate
import com.sun.org.apache.bcel.internal.generic.ILOAD; //导入依赖的package包/类
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final InstructionList il = methodGen.getInstructionList();
if (methodGen instanceof CompareGenerator) {
il.append(((CompareGenerator)methodGen).loadCurrentNode());
}
else if (methodGen instanceof TestGenerator) {
il.append(new ILOAD(POSITION_INDEX));
}
else {
final ConstantPoolGen cpg = classGen.getConstantPool();
final int index = cpg.addInterfaceMethodref(NODE_ITERATOR,
"getPosition",
"()I");
il.append(methodGen.loadIterator());
il.append(new INVOKEINTERFACE(index,1));
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:PositionCall.java
示例6: translateTo
import com.sun.org.apache.bcel.internal.generic.ILOAD; //导入依赖的package包/类
/**
* Translates reference into object of internal type <code>type</code>.
*
* @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
*/
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
StringType type) {
final int current = methodGen.getLocalIndex("current");
ConstantPoolGen cpg = classGen.getConstantPool();
InstructionList il = methodGen.getInstructionList();
// If no current, conversion is a top-level
if (current < 0) {
il.append(new PUSH(cpg, DTM.ROOT_NODE)); // push root node
}
else {
il.append(new ILOAD(current));
}
il.append(methodGen.loadDOM());
final int stringF = cpg.addMethodref(BASIS_LIBRARY_CLASS,
"stringF",
"("
+ OBJECT_SIG
+ NODE_SIG
+ DOM_INTF_SIG
+ ")" + STRING_SIG);
il.append(new INVOKESTATIC(stringF));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:ReferenceType.java
示例7: loadLocal
import com.sun.org.apache.bcel.internal.generic.ILOAD; //导入依赖的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
示例8: CompareGenerator
import com.sun.org.apache.bcel.internal.generic.ILOAD; //导入依赖的package包/类
public CompareGenerator(int access_flags, Type return_type,
Type[] arg_types, String[] arg_names,
String method_name, String class_name,
InstructionList il, ConstantPoolGen cp) {
super(access_flags, return_type, arg_types, arg_names, method_name,
class_name, il, cp);
_iloadCurrent = new ILOAD(CURRENT_INDEX);
_istoreCurrent = new ISTORE(CURRENT_INDEX);
_aloadDom = new ALOAD(DOM_INDEX);
_iloadLast = new ILOAD(LAST_INDEX);
LocalVariableGen iterator =
addLocalVariable("iterator",
Util.getJCRefType(Constants.NODE_ITERATOR_SIG),
null, null);
ITERATOR_INDEX = iterator.getIndex();
_aloadIterator = new ALOAD(ITERATOR_INDEX);
_astoreIterator = new ASTORE(ITERATOR_INDEX);
il.append(new ACONST_NULL());
il.append(storeIterator());
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:CompareGenerator.java
注:本文中的com.sun.org.apache.bcel.internal.generic.ILOAD类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论