@Override public ConstantPoolGen analyze(IAnalysisCache analysisCache, ClassDescriptor descriptor) throws CheckedAnalysisException { ClassGen classGen = new ClassGen(analysisCache.getClassAnalysis(JavaClass.class, descriptor)); return classGen.getConstantPool(); }
MethodGen methodGen = new MethodGen(method, jclass.getClassName(), classGen.getConstantPool());
public AttributeSetMethodGenerator(String methodName, ClassGen classGen) { super(org.apache.bcel.Constants.ACC_PRIVATE, org.apache.bcel.generic.Type.VOID, argTypes, argNames, methodName, classGen.getClassName(), new InstructionList(), classGen.getConstantPool()); _aloadDom = new ALOAD(DOM_INDEX); _astoreDom = new ASTORE(DOM_INDEX); _astoreIterator = new ASTORE(ITERATOR_INDEX); _aloadIterator = new ALOAD(ITERATOR_INDEX); _astoreHandler = new ASTORE(HANDLER_INDEX); _aloadHandler = new ALOAD(HANDLER_INDEX); }
CLASS_NAME_SERIALIZABLE_IMPL, GENERATED, Constants.ACC_PUBLIC | Constants.ACC_SUPER, new String[] {Valuable.class.getName()}); ConstantPoolGen cp = cg.getConstantPool(); InstructionFactory fac = new InstructionFactory(cg, cp);
/** * Translate contents only if this fallback element is put in place of * some unsupported element or non-XSLTC extension element */ public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); if (_active) translateContents(classGen, methodGen); } }
public void translate(ClassGenerator classGen, MethodGenerator methodGen) { ConstantPoolGen cpg = classGen.getConstantPool(); InstructionList il = methodGen.getInstructionList(); il.append(new PUSH(cpg, _value)); }
/** * Translate this attribute value into JVM bytecodes that pushes the * attribute value onto the JVM's stack. * @param classGen BCEL Java class generator * @param methodGen BCEL Java method generator */ public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); il.append(new PUSH(cpg, _value)); } }
public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); il.append(new PUSH(cpg, _value)); } }
/** * Translates a void into a string by pushing the empty string ''. * * @see org.apache.xalan.xsltc.compiler.util.Type#translateTo */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type) { final InstructionList il = methodGen.getInstructionList(); il.append(new PUSH(classGen.getConstantPool(), "")); }
public void translate(ClassGenerator classGen, MethodGenerator methodGen) { ConstantPoolGen cpg = classGen.getConstantPool(); InstructionList il = methodGen.getInstructionList(); il.append(new PUSH(cpg, _value)); } }
public void translateLang(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); il.append(new PUSH(cpg, _lang)); // bug! see 26869 }
public void translate(ClassGenerator classGen, MethodGenerator methodGen) { ConstantPoolGen cpg = classGen.getConstantPool(); InstructionList il = methodGen.getInstructionList(); il.append(new PUSH(cpg, _value)); } }
public void translate(ClassGenerator classGen, MethodGenerator methodGen) { ConstantPoolGen cpg = classGen.getConstantPool(); InstructionList il = methodGen.getInstructionList(); il.append(new PUSH(cpg, _value)); }
/** * Calls to 'element-available' are resolved at compile time since * the namespaces declared in the stylsheet are not available at run * time. Consequently, arguments to this function must be literals. */ public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final boolean result = getResult(); methodGen.getInstructionList().append(new PUSH(cpg, result)); } }
/** * Some type conversions require gettting the first node from the node-set. * This function is defined to avoid code repetition. */ private void getFirstNode(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); il.append(new INVOKEINTERFACE(cpg.addInterfaceMethodref(NODE_ITERATOR, NEXT, NEXT_SIG), 1)); }
/** * Calls to 'function-available' are resolved at compile time since * the namespaces declared in the stylsheet are not available at run * time. Consequently, arguments to this function must be literals. */ public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); methodGen.getInstructionList().append(new PUSH(cpg, getResult())); }
public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); argument(0).translate(classGen, methodGen); il.append(new INVOKESTATIC(cpg.addMethodref(MATH_CLASS, "ceil", "(D)D"))); } }
public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // Get two copies of the argument on the stack argument().translate(classGen, methodGen); il.append(new INVOKESTATIC(cpg.addMethodref(BASIS_LIBRARY_CLASS, "roundF", "(D)D"))); } }
/** * Translates an object of this type to its unboxed representation. */ public void translateUnBox(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); il.append(new CHECKCAST(cpg.addClass(RUNTIME_NODE_CLASS))); il.append(new GETFIELD(cpg.addFieldref(RUNTIME_NODE_CLASS, NODE_FIELD, NODE_FIELD_SIG))); }
/** * Translates an object of this type to its unboxed representation. */ public void translateUnBox(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); il.append(new CHECKCAST(cpg.addClass(RUNTIME_NODE_CLASS))); il.append(new GETFIELD(cpg.addFieldref(RUNTIME_NODE_CLASS, NODE_FIELD, NODE_FIELD_SIG))); }