Uses of Class
org.apache.bcel.generic.ConstantPoolGen
Packages that use ConstantPoolGen
Package
Description
Generic part of the Apache Byte Code Engineering Library (BCEL), classes to dynamically modify class objects
and byte code instructions.
A PassVerifier class mostly used internally by JustIce, yielding a control flow graph for public use as a nice side effect.
-
Uses of ConstantPoolGen in org.apache.bcel.generic
Fields in org.apache.bcel.generic declared as ConstantPoolGenModifier and TypeFieldDescriptionprotected ConstantPoolGenFieldGenOrMethodGen.cpDeprecated.(since 6.0) will be made private; do not access directly, use getter/setterprotected ConstantPoolGenInstructionFactory.cpDeprecated.(since 6.0) will be made private; do not access directly, use getter/setterprotected ConstantPoolGenElementValueGen.cpGenDeprecated.(since 6.0) will be made private and final; do not access directly, use getterMethods in org.apache.bcel.generic that return ConstantPoolGenModifier and TypeMethodDescriptionClassGen.getConstantPool()Gets the constant pool.protected ConstantPoolGenElementValueGen.getConstantPool()Gets the constant pool.FieldGenOrMethodGen.getConstantPool()Gets the constant pool.InstructionFactory.getConstantPool()Gets the constant pool generator.Methods in org.apache.bcel.generic with parameters of type ConstantPoolGenModifier and TypeMethodDescriptionvoidMethodGen.addAnnotationsAsAttribute(ConstantPoolGen cp) Adds annotations as an attribute.intConstantPoolGen.addConstant(Constant constant, ConstantPoolGen cpGen) Adds a constant from another ConstantPool and returns the new index.voidMethodGen.addParameterAnnotationsAsAttribute(ConstantPoolGen cp) Adds parameter annotations as an attribute.intInstruction.consumeStack(ConstantPoolGen cpg) This method also gives right results for instructions whose effect on the stack depends on the constant pool entry they reference.intInvokeInstruction.consumeStack(ConstantPoolGen cpg) Also works for instructions whose stack effect depends on the constant pool entry they reference.intINVOKEINTERFACE.consumeStack(ConstantPoolGen cpg) intMULTIANEWARRAY.consumeStack(ConstantPoolGen cpg) Also works for instructions whose stack effect depends on the constant pool entry they reference.intPUTFIELD.consumeStack(ConstantPoolGen cpg) intPUTSTATIC.consumeStack(ConstantPoolGen cpg) intStackConsumer.consumeStack(ConstantPoolGen cpg) Gets how many words are consumed from stack.static ElementValueGenElementValueGen.copy(ElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) Creates an (modifiable) ElementValueGen copy of an (immutable) ElementValue - constant pool is assumed correct.FieldGen.copy(ConstantPoolGen cp) Creates a deep copy of this field.MethodGen.copy(String className, ConstantPoolGen cp) Creates a deep copy of this method.Type[]InvokeInstruction.getArgumentTypes(ConstantPoolGen cpg) Gets the argument types of referenced method.FieldOrMethod.getClassName(ConstantPoolGen cpg) Deprecated.If the instruction references an array class, this method will return "java.lang.Object".INVOKEDYNAMIC.getClassName(ConstantPoolGen cpg) Override the parent method because our class name is held elsewhere.InvokeInstruction.getClassName(ConstantPoolGen cpg) This overrides the deprecated version as we know here that the referenced class may legally be an array.FieldOrMethod.getClassType(ConstantPoolGen cpg) Deprecated.If the instruction references an array class, the ObjectType returned will be invalid.CodeExceptionGen.getCodeException(ConstantPoolGen cp) Gets CodeException object.FieldInstruction.getFieldName(ConstantPoolGen cpg) Gets the name of referenced field.protected intFieldInstruction.getFieldSize(ConstantPoolGen cpg) Gets the size of field.FieldInstruction.getFieldType(ConstantPoolGen cpg) Gets the type of field.MethodGen.getLineNumberTable(ConstantPoolGen cp) Gets the 'LineNumberTable' attribute of all the local variables of this method.ANEWARRAY.getLoadClassType(ConstantPoolGen cpg) CHECKCAST.getLoadClassType(ConstantPoolGen cpg) FieldOrMethod.getLoadClassType(ConstantPoolGen cpg) Gets the ObjectType of the method return or field.INSTANCEOF.getLoadClassType(ConstantPoolGen cpg) LoadClass.getLoadClassType(ConstantPoolGen cpg) Returns theObjectTypeof the referenced class or interface that may be loaded and resolved.MULTIANEWARRAY.getLoadClassType(ConstantPoolGen cpg) NEW.getLoadClassType(ConstantPoolGen cpg) LocalVariableGen.getLocalVariable(ConstantPoolGen cp) Gets LocalVariable object.MethodGen.getLocalVariableTable(ConstantPoolGen cp) Gets the 'LocalVariableTable' attribute of all the local variables of this method.static intMethodGen.getMaxStack(ConstantPoolGen cp, InstructionList il, CodeExceptionGen[] et) Computes stack usage of an instruction list by performing control flow analysis.InvokeInstruction.getMethodName(ConstantPoolGen cpg) Gets the name of referenced method.FieldOrMethod.getName(ConstantPoolGen cpg) Gets the name of referenced method or field.NameSignatureInstruction.getName(ConstantPoolGen cpg) NameSignatureInstruction.getNameAndType(ConstantPoolGen cpg) FieldOrMethod.getReferenceType(ConstantPoolGen cpg) Gets the reference type representing the class, interface, or array class referenced by the instruction.INVOKEDYNAMIC.getReferenceType(ConstantPoolGen cpg) Since InvokeDynamic doesn't refer to a reference type, just returnObject, as that is the only type we can say for sure the reference will be.InvokeInstruction.getReturnType(ConstantPoolGen cpg) Gets the return type of referenced method.FieldOrMethod.getSignature(ConstantPoolGen cpg) Gets the signature of referenced method or field.NameSignatureInstruction.getSignature(ConstantPoolGen cpg) ACONST_NULL.getType(ConstantPoolGen cp) ArithmeticInstruction.getType(ConstantPoolGen cp) ArrayInstruction.getType(ConstantPoolGen cp) BIPUSH.getType(ConstantPoolGen cp) ConversionInstruction.getType(ConstantPoolGen cp) CPInstruction.getType(ConstantPoolGen cpg) DCMPG.getType(ConstantPoolGen cp) DCMPL.getType(ConstantPoolGen cp) DCONST.getType(ConstantPoolGen cp) FCMPG.getType(ConstantPoolGen cp) FCMPL.getType(ConstantPoolGen cp) FCONST.getType(ConstantPoolGen cp) FieldInstruction.getType(ConstantPoolGen cpg) ICONST.getType(ConstantPoolGen cp) IINC.getType(ConstantPoolGen cp) Gets the int type.InvokeInstruction.getType(ConstantPoolGen cpg) Gets the return type of referenced method.JsrInstruction.getType(ConstantPoolGen cp) LCMP.getType(ConstantPoolGen cp) LCONST.getType(ConstantPoolGen cp) LDC.getType(ConstantPoolGen cpg) LDC2_W.getType(ConstantPoolGen cpg) LoadClass.getType(ConstantPoolGen cpg) Returns the type associated with this instruction.LocalVariableInstruction.getType(ConstantPoolGen cp) Returns the type associated with the instruction - in case of ALOAD or ASTORE Type.OBJECT is returned.RET.getType(ConstantPoolGen cp) ReturnInstruction.getType(ConstantPoolGen cp) SIPUSH.getType(ConstantPoolGen cp) StackInstruction.getType(ConstantPoolGen cp) Gets the type.TypedInstruction.getType(ConstantPoolGen cpg) Gets the type associated with this instruction.LDC.getValue(ConstantPoolGen cpg) LDC2_W.getValue(ConstantPoolGen cpg) intGETFIELD.produceStack(ConstantPoolGen cpg) intGETSTATIC.produceStack(ConstantPoolGen cpg) intInstruction.produceStack(ConstantPoolGen cpg) This method also gives right results for instructions whose effect on the stack depends on the constant pool entry they reference.intInvokeInstruction.produceStack(ConstantPoolGen cpg) Also works for instructions whose stack effect depends on the constant pool entry they reference.intStackProducer.produceStack(ConstantPoolGen cpg) Gets how many words are produced on stack.static AnnotationEntryGenAnnotationEntryGen.read(DataInput dis, ConstantPoolGen cpool, boolean b) Reads an AnnotationEntryGen from a DataInput.static ElementValueGenElementValueGen.readElementValue(DataInput dis, ConstantPoolGen cpGen) Reads an element value from a DataInput.voidInstructionList.replaceConstantPool(ConstantPoolGen oldCp, ConstantPoolGen newCp) Replace all references to the old constant pool with references to the new constant pool.voidClassGen.setConstantPool(ConstantPoolGen constantPool) Sets the constant pool.voidFieldGenOrMethodGen.setConstantPool(ConstantPoolGen cp) Sets the constant pool.voidInstructionFactory.setConstantPool(ConstantPoolGen c) Sets the constant pool generator.Constructors in org.apache.bcel.generic with parameters of type ConstantPoolGenModifierConstructorDescriptionAnnotationElementValueGen(int type, AnnotationEntryGen annotation, ConstantPoolGen cpool) Constructs an AnnotationElementValueGen.AnnotationElementValueGen(AnnotationElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) Constructs an AnnotationElementValueGen.Constructs an AnnotationElementValueGen.AnnotationEntryGen(AnnotationEntry a, ConstantPoolGen cpool, boolean copyPoolEntries) Here we are taking a fixed annotation of type Annotation and building a modifiable AnnotationGen object.AnnotationEntryGen(ObjectType type, List<ElementValuePairGen> elements, boolean vis, ConstantPoolGen cpool) Constructs an AnnotationEntryGen.ArrayElementValueGen(int type, ElementValue[] elementValues, ConstantPoolGen cpool) Constructs an ArrayElementValueGen.ArrayElementValueGen(ArrayElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) Constructs an ArrayElementValueGen.Constructs an ArrayElementValueGen.protectedClassElementValueGen(int typeIdx, ConstantPoolGen cpool) Constructs a ClassElementValueGen.ClassElementValueGen(ClassElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) Constructs a ClassElementValueGen.ClassElementValueGen(ObjectType t, ConstantPoolGen cpool) Constructs a ClassElementValueGen.ClassGen(String className, String superClassName, String fileName, int accessFlags, String[] interfaces, ConstantPoolGen cp) Convenience constructor to set up some important values initially.protectedElementValueGen(int type, ConstantPoolGen cpGen) Constructs an ElementValueGen.protectedElementValuePairGen(int idx, ElementValueGen value, ConstantPoolGen cpool) Constructs an ElementValuePairGen.ElementValuePairGen(String name, ElementValueGen value, ConstantPoolGen cpool) Constructs an ElementValuePairGen.ElementValuePairGen(ElementValuePair nvp, ConstantPoolGen cpool, boolean copyPoolEntries) Constructs an ElementValuePairGen from an ElementValuePair.protectedEnumElementValueGen(int typeIdx, int valueIdx, ConstantPoolGen cpool) This constructor assumes the constant pool already contains the right type and value - as indicated by typeIdx and valueIdx.EnumElementValueGen(EnumElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) Constructs an EnumElementValueGen from an EnumElementValue.EnumElementValueGen(ObjectType t, String value, ConstantPoolGen cpool) Constructs an EnumElementValueGen.FieldGen(int accessFlags, Type type, String name, ConstantPoolGen cp) Declare a field.FieldGen(Field field, ConstantPoolGen cp) Instantiate from existing field.Constructs an InstructionFactory.Initialize just with ConstantPoolGen object.MethodGen(int accessFlags, Type returnType, Type[] argTypes, String[] argNames, String methodName, String className, InstructionList il, ConstantPoolGen cp) Declare method.MethodGen(Method method, String className, ConstantPoolGen cp) Instantiate from existing method.PUSH(ConstantPoolGen cp, boolean value) PUSH(ConstantPoolGen cp, double value) PUSH(ConstantPoolGen cp, float value) PUSH(ConstantPoolGen cp, int value) This constructor also applies for values of type short, char, bytePUSH(ConstantPoolGen cp, long value) PUSH(ConstantPoolGen cp, Boolean value) PUSH(ConstantPoolGen cp, Character value) creates a push object from a Character value.PUSH(ConstantPoolGen cp, Number value) PUSH(ConstantPoolGen cp, String value) PUSH(ConstantPoolGen cp, ArrayType value) Pushes an array type constant, for exampleint[].class,String[].class, and so on.PUSH(ConstantPoolGen cp, ObjectType value) protectedSimpleElementValueGen(int type, int idx, ConstantPoolGen cpGen) Protected ctor used for deserialization, doesn't *put* an entry in the constant pool, assumes the one at the supplied index is correct.SimpleElementValueGen(int type, ConstantPoolGen cpGen, boolean value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, byte value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, char value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, double value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, float value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, int value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, long value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, short value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, String value) SimpleElementValueGen(SimpleElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) The boolean controls whether we copy info from the 'old' constant pool to the 'new'. -
Uses of ConstantPoolGen in org.apache.bcel.verifier.structurals
Methods in org.apache.bcel.verifier.structurals with parameters of type ConstantPoolGenModifier and TypeMethodDescriptionvoidExecutionVisitor.setConstantPoolGen(ConstantPoolGen cpg) Sets the ConstantPoolGen needed for symbolic execution.voidInstConstraintVisitor.setConstantPoolGen(ConstantPoolGen cpg) Sets the ConstantPoolGen instance needed for constraint checking prior to execution.