org.apache.bcel.generic.NEW.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(158)

本文整理了Java中org.apache.bcel.generic.NEW.<init>()方法的一些代码示例,展示了NEW.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NEW.<init>()方法的具体详情如下:
包路径:org.apache.bcel.generic.NEW
类名称:NEW
方法名:<init>

NEW.<init>介绍

[英]Empty constructor needed for Instruction.readInstruction. Not to be used otherwise.
[中]指令所需的空构造函数。阅读说明。不得以其他方式使用。

代码示例

代码示例来源:origin: xalan/xalan

/**
 * Expects an integer on the stack and pushes a boxed integer.
 * Boxed integers are represented by an instance of
 * <code>java.lang.Integer</code>.
 *
 * @see    org.apache.xalan.xsltc.compiler.util.Type#translateTo
 */
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, 
      ReferenceType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new NEW(cpg.addClass(INTEGER_CLASS)));
il.append(DUP_X1);
il.append(SWAP);
il.append(new INVOKESPECIAL(cpg.addMethodref(INTEGER_CLASS,
             "<init>", "(I)V")));
}

代码示例来源:origin: xalan/xalan

/**
 * Expects a boolean on the stack and pushes a boxed boolean.
 * Boxed booleans are represented by an instance of
 * <code>java.lang.Boolean</code>.
 *
 * @see    org.apache.xalan.xsltc.compiler.util.Type#translateTo
 */
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, 
      ReferenceType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new NEW(cpg.addClass(BOOLEAN_CLASS)));
il.append(DUP_X1);
il.append(SWAP);
il.append(new INVOKESPECIAL(cpg.addMethodref(BOOLEAN_CLASS,
             "<init>",
             "(Z)V")));
}

代码示例来源:origin: xalan/xalan

/**
 * Expects a node on the stack and pushes a singleton node-set. Singleton
 * iterators are already started after construction.
 *
 * @see    org.apache.xalan.xsltc.compiler.util.Type#translateTo
 */
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, 
      NodeSetType type) {
ConstantPoolGen cpg = classGen.getConstantPool();
InstructionList il = methodGen.getInstructionList();
// Create a new instance of SingletonIterator
il.append(new NEW(cpg.addClass(SINGLETON_ITERATOR)));
il.append(DUP_X1);
il.append(SWAP);
final int init = cpg.addMethodref(SINGLETON_ITERATOR, "<init>",
         "(" + NODE_SIG +")V");
il.append(new INVOKESPECIAL(init));
}

代码示例来源:origin: xalan/xalan

/**
 * Expects a double on the stack and pushes a boxed double. Boxed 
 * double are represented by an instance of <code>java.lang.Double</code>.
 *
 * @see    org.apache.xalan.xsltc.compiler.util.Type#translateTo
 */
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, 
      ReferenceType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new NEW(cpg.addClass(DOUBLE_CLASS)));
il.append(DUP_X2);
il.append(DUP_X2);
il.append(POP);
il.append(new INVOKESPECIAL(cpg.addMethodref(DOUBLE_CLASS,
             "<init>", "(D)V")));
}

代码示例来源:origin: xalan/xalan

/**
 * Expects a node on the stack and pushes a boxed node. Boxed nodes
 * are represented by an instance of <code>org.apache.xalan.xsltc.dom.Node</code>.
 *
 * @see    org.apache.xalan.xsltc.compiler.util.Type#translateTo
 */
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, 
      ReferenceType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new NEW(cpg.addClass(RUNTIME_NODE_CLASS)));
il.append(DUP_X1);
il.append(SWAP);
il.append(new PUSH(cpg, _type));
il.append(new INVOKESPECIAL(cpg.addMethodref(RUNTIME_NODE_CLASS,
             "<init>", "(II)V")));
}

代码示例来源:origin: xalan/xalan

"toString",
         "()"+STRING_SIG);
il.append(new NEW(cpg.addClass(STRING_BUFFER_CLASS)));
il.append(DUP);
il.append(new INVOKESPECIAL(initBuffer));

代码示例来源:origin: xalan/xalan

il.append(new NEW(cpg.addClass(_className)));
il.append(DUP);
il.append(new INVOKESPECIAL(cpg.addMethodref(_className,

代码示例来源:origin: xalan/xalan

+NODE_ITERATOR_SIG
      +")V");
il.append(new NEW(cpg.addClass(CACHED_NODE_LIST_ITERATOR_CLASS)));
il.append(DUP_X1);
il.append(SWAP);

代码示例来源:origin: xalan/xalan

"()"+STRING_SIG);
il.append(new NEW(cpg.addClass(STRING_BUFFER_CLASS)));
il.append(DUP);
il.append(new INVOKESPECIAL(initBuffer));

代码示例来源:origin: xalan/xalan

il.append(new NEW(cpg.addClass(UNION_ITERATOR_CLASS)));
il.append(DUP);
il.append(methodGen.loadDOM());

代码示例来源:origin: xalan/xalan

il.append(new ISTORE(predicateValueTemp.getIndex())));
il.append(new NEW(cpg.addClass(NTH_ITERATOR_CLASS)));
il.append(DUP);
iteratorTemp.setEnd(
il.append(new NEW(cpg.addClass(CURRENT_NODE_LIST_ITERATOR)));
il.append(DUP);

代码示例来源:origin: xalan/xalan

il.append(new NEW(cpg.addClass(DUP_FILTERED_ITERATOR)));
il.append(DUP);
  pathTemp.setEnd(il.append(new ALOAD(pathTemp.getIndex())));

代码示例来源:origin: xalan/xalan

il.append(new NEW(cpg.addClass(ABSOLUTE_ITERATOR)));
il.append(DUP);
  relPathIterator.setEnd(

代码示例来源:origin: xalan/xalan

il.append(new NEW(cpg.addClass(DFS_CLASS)));
il.append(DUP);
  il.append(new GETSTATIC(cpg.addFieldref(LOCALE_CLASS, "US",

代码示例来源:origin: xalan/xalan

il.append(new NEW(cpg.addClass(STREAM_XML_OUTPUT)));
    il.append(methodGen.storeHandler());
    il.append(new NEW(cpg.addClass(STRING_WRITER)));
    il.append(DUP);
    il.append(DUP);
          "<init>",
          "(Ljava/lang/String;)V");
il.append(new NEW(cpg.addClass("java.lang.RuntimeException")));
il.append(DUP);
il.append(new PUSH(cpg,"Termination forced by an " +

代码示例来源:origin: xalan/xalan

il.append(new ASTORE(sortRecordFactoryTemp.getIndex())));
il.append(new NEW(cpg.addClass(SORT_ITERATOR)));
il.append(DUP);
  nodesTemp.setEnd(il.append(new ALOAD(nodesTemp.getIndex())));

代码示例来源:origin: xalan/xalan

il.append(new NEW(cpg.addClass(STRING_VALUE_HANDLER)));
il.append(DUP);
il.append(DUP);

代码示例来源:origin: xalan/xalan

pathTemp.setStart(il.append(new ASTORE(pathTemp.getIndex())));
il.append(new NEW(cpg.addClass(STEP_ITERATOR_CLASS)));
il.append(DUP);
  filterTemp.setEnd(il.append(new ALOAD(filterTemp.getIndex())));

代码示例来源:origin: xalan/xalan

+NODE_ITERATOR_SIG
          +")V");
il.append(new NEW(cpg.addClass(STEP_ITERATOR_CLASS)));
il.append(DUP);

代码示例来源:origin: xalan/xalan

il.append(new ASTORE(stepIteratorTemp.getIndex())));
il.append(new NEW(cpg.addClass(MATCHING_ITERATOR)));
il.append(DUP);
il.append(new ILOAD(match.getIndex()));

相关文章