/** * 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"))); }
/** * 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"))); }
/** * 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)); }
/** * 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"))); }
/** * 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"))); }
"toString", "()"+STRING_SIG); il.append(new NEW(cpg.addClass(STRING_BUFFER_CLASS))); il.append(DUP); il.append(new INVOKESPECIAL(initBuffer));
il.append(new NEW(cpg.addClass(_className))); il.append(DUP); il.append(new INVOKESPECIAL(cpg.addMethodref(_className,
+NODE_ITERATOR_SIG +")V"); il.append(new NEW(cpg.addClass(CACHED_NODE_LIST_ITERATOR_CLASS))); il.append(DUP_X1); il.append(SWAP);
"()"+STRING_SIG); il.append(new NEW(cpg.addClass(STRING_BUFFER_CLASS))); il.append(DUP); il.append(new INVOKESPECIAL(initBuffer));
il.append(new NEW(cpg.addClass(UNION_ITERATOR_CLASS))); il.append(DUP); il.append(methodGen.loadDOM());
il.append(new NEW(cpg.addClass(DUP_FILTERED_ITERATOR))); il.append(DUP); pathTemp.setEnd(il.append(new ALOAD(pathTemp.getIndex())));
il.append(new NEW(cpg.addClass(ABSOLUTE_ITERATOR))); il.append(DUP); relPathIterator.setEnd(
il.append(new NEW(cpg.addClass(DFS_CLASS))); il.append(DUP); il.append(new GETSTATIC(cpg.addFieldref(LOCALE_CLASS, "US",
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 " +
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())));
il.append(new NEW(cpg.addClass(STRING_VALUE_HANDLER))); il.append(DUP); il.append(DUP);
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())));
+NODE_ITERATOR_SIG +")V"); il.append(new NEW(cpg.addClass(STEP_ITERATOR_CLASS))); il.append(DUP);
il.append(new ASTORE(stepIteratorTemp.getIndex()))); il.append(new NEW(cpg.addClass(MATCHING_ITERATOR))); il.append(DUP); il.append(new ILOAD(match.getIndex()));