Uses of Class
org.apache.bcel.generic.Type
Packages that use Type
Package
Description
Classes that describe the structure of a Java class file and a class file parser.
Generic part of the Apache Byte Code Engineering Library (BCEL), classes to dynamically modify class objects
and byte code instructions.
PassVerifier classes used internally by JustIce.
A PassVerifier class mostly used internally by JustIce, yielding a control flow graph for public use as a nice side effect.
-
Uses of Type in org.apache.bcel.classfile
Methods in org.apache.bcel.classfile that return TypeModifier and TypeMethodDescriptionType[]Method.getArgumentTypes()Gets an array of method argument types.Method.getReturnType()Gets return type of method.Field.getType()Gets the field type.Methods in org.apache.bcel.classfile with parameters of type Type -
Uses of Type in org.apache.bcel.generic
Subclasses of Type in org.apache.bcel.genericModifier and TypeClassDescriptionfinal classDenotes array type, such as int[][]final classDenotes basic type such as int.classDenotes reference such asString.classSuperclass for object and array types.classReturnaddress, the type JSR or JSR_W instructions push upon the stack.Fields in org.apache.bcel.generic declared as TypeModifier and TypeFieldDescriptionstatic final Type[]Type.NO_ARGSEmpty array.protected TypeFieldGenOrMethodGen.typeDeprecated.(since 6.0) will be made private; do not access directly, use getter/setterstatic final TypeType.UNKNOWNPredefined constant for unknown type.Methods in org.apache.bcel.generic that return TypeModifier and TypeMethodDescriptionMethodGen.getArgumentType(int i) Gets the argument type at the specified index.Type[]InvokeInstruction.getArgumentTypes(ConstantPoolGen cpg) Gets the argument types of referenced method.Type[]MethodGen.getArgumentTypes()Gets all argument types.static Type[]Type.getArgumentTypes(String signature) Gets the argument types of a method from its signature as an array of Type objects.ArrayType.getBasicType()Gets the basic type of array, that is, forint[][][]the basic type is int.ArrayType.getElementType()Gets the element type of array, that is, forint[][][]the element type isint[][].FieldInstruction.getFieldType(ConstantPoolGen cpg) Gets the type of field.InvokeInstruction.getReturnType(ConstantPoolGen cpg) Gets the return type of referenced method.MethodGen.getReturnType()Gets the return type.static TypeType.getReturnType(String signature) Gets the return type of a method from its signature as a Type object.ACONST_NULL.getType(ConstantPoolGen cp) GetsType.NULL.ArithmeticInstruction.getType(ConstantPoolGen cp) Gets the type associated with the instruction.ArrayInstruction.getType(ConstantPoolGen cp) Gets the type associated with the instruction.BIPUSH.getType(ConstantPoolGen cp) GetsType.BYTE.ConversionInstruction.getType(ConstantPoolGen cp) Gets the type associated with the instruction.CPInstruction.getType(ConstantPoolGen cpg) Gets the type associated with this instruction.DCMPG.getType(ConstantPoolGen cp) GetsType.DOUBLE.DCMPL.getType(ConstantPoolGen cp) GetsType.DOUBLE.DCONST.getType(ConstantPoolGen cp) GetsType.DOUBLE.FCMPG.getType(ConstantPoolGen cp) GetsType.FLOAT.FCMPL.getType(ConstantPoolGen cp) GetsType.FLOAT.FCONST.getType(ConstantPoolGen cp) GetsType.FLOAT.FieldGenOrMethodGen.getType()FieldInstruction.getType(ConstantPoolGen cpg) Gets the type of the referenced field.ICONST.getType(ConstantPoolGen cp) GetsType.INT.IINC.getType(ConstantPoolGen cp) Gets the int type.InvokeInstruction.getType(ConstantPoolGen cpg) Gets the return type of referenced method.JsrInstruction.getType(ConstantPoolGen cp) Gets the return address type.LCMP.getType(ConstantPoolGen cp) GetsType.LONG.LCONST.getType(ConstantPoolGen cp) GetsType.LONG.LDC.getType(ConstantPoolGen cpg) LDC2_W.getType(ConstantPoolGen cpg) LoadClass.getType(ConstantPoolGen cpg) Gets the type associated with this instruction.LocalVariableGen.getType()LocalVariableInstruction.getType(ConstantPoolGen cp) Gets the type associated with the instruction - in case of ALOAD or ASTORE Type.OBJECT is returned.NamedAndTyped.getType()Gets the type.final TypeNEWARRAY.getType()Gets the type of the constructed array.RET.getType(ConstantPoolGen cp) Gets the return address type.ReturnInstruction.getType()Gets the type of the returned value.ReturnInstruction.getType(ConstantPoolGen cp) Gets the type associated with the instruction.SIPUSH.getType(ConstantPoolGen cp) GetsType.SHORT.StackInstruction.getType(ConstantPoolGen cp) Gets the type.static TypeGets the BCEL Type object corresponding to a runtimeClass.static TypeGets the Type object corresponding to a signature.TypedInstruction.getType(ConstantPoolGen cpg) Gets the type associated with this instruction.static Type[]Gets the BCEL Type objects corresponding to an array of runtime classes.Type.normalizeForStackOrLocal()boolean, short and char variable are considered as int in the stack or local variable area.Methods in org.apache.bcel.generic with parameters of type TypeModifier and TypeMethodDescriptionMethodGen.addLocalVariable(String name, Type type, int slot, InstructionHandle start, InstructionHandle end) Adds a local variable to this method.MethodGen.addLocalVariable(String name, Type type, int slot, InstructionHandle start, InstructionHandle end, int origIndex) Adds a local variable to this method.MethodGen.addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) Adds a local variable to this method and assigns an index automatically.InstructionFactory.createAppend(Type type) Creates an append instruction for the given type.static ArrayInstructionInstructionFactory.createArrayLoad(Type type) Creates an array load instruction for the given type.static ArrayInstructionInstructionFactory.createArrayStore(Type type) Creates an array store instruction for the given type.static ArithmeticInstructionInstructionFactory.createBinaryOperation(String op, Type type) Create binary operation for simple basic types, such as int and float.InstructionFactory.createCast(Type srcType, Type destType) Create conversion operation for two stack operands, this may be an I2C, instruction, for example, if the operands are basic types and CHECKCAST if they are reference types.InstructionFactory.createFieldAccess(String className, String name, Type type, short kind) Create a field instruction.InstructionFactory.createGetField(String className, String name, Type t) Creates a GETFIELD instruction.InstructionFactory.createGetStatic(String className, String name, Type t) Creates a GETSTATIC instruction.InstructionFactory.createInvoke(String className, String name, Type retType, Type[] argTypes, short kind) Create an invoke instruction.InstructionFactory.createInvoke(String className, String name, Type retType, Type[] argTypes, short kind, boolean useInterface) Create an invoke instruction.static LocalVariableInstructionInstructionFactory.createLoad(Type type, int index) Creates a load instruction for the given type.InstructionFactory.createNewArray(Type t, short dim) Create new array of given size and type.static InstructionInstructionFactory.createNull(Type type) Create "null" value for reference types, 0 for basic types like int.InstructionFactory.createPutField(String className, String name, Type t) Creates a PUTFIELD instruction.InstructionFactory.createPutStatic(String className, String name, Type t) Creates a PUTSTATIC instruction.static ReturnInstructionInstructionFactory.createReturn(Type type) Create typed return.static LocalVariableInstructionInstructionFactory.createStore(Type type, int index) Creates a store instruction.static StringType.getMethodSignature(Type returnType, Type[] argTypes) Gets the Java method signature for the given types, for example, int[] f(java.lang.String x) becomes (Ljava/lang/String;)[I.booleanReferenceType.isAssignmentCompatibleWith(Type t) Tests whether this type is assignment compatible with another type t as defined in the JVM specification; see the AASTORE definition there.booleanReferenceType.isCastableTo(Type t) Tests whether this type is castable to another type t as defined in the JVM specification.booleanArrayType.isElementType(Type type) Tests whether the given type is the element type of this array type, that is, forint[][][]the element type isint[][].voidMethodGen.setArgumentType(int i, Type type) Sets the argument type at the specified index.voidMethodGen.setArgumentTypes(Type[] argTypes) Sets all argument types.voidMethodGen.setReturnType(Type returnType) Sets the return type.voidvoidvoidSets the type.Constructors in org.apache.bcel.generic with parameters of type TypeModifierConstructorDescriptionConstructor for array of given typeFieldGen(int accessFlags, Type type, String name, ConstantPoolGen cp) Declare a field.LocalVariableGen(int index, String name, Type type, InstructionHandle start, InstructionHandle end) Generates a local variable with the given index.LocalVariableGen(int index, String name, Type type, InstructionHandle start, InstructionHandle end, int origIndex) Generates a local variable with the given index.MethodGen(int accessFlags, Type returnType, Type[] argTypes, String[] argNames, String methodName, String className, InstructionList il, ConstantPoolGen cp) Declare method. -
Uses of Type in org.apache.bcel.verifier.statics
Subclasses of Type in org.apache.bcel.verifier.staticsModifier and TypeClassDescriptionfinal classThis class represents the upper half of a DOUBLE variable.final classThis class represents the upper half of a LONG variable.Methods in org.apache.bcel.verifier.statics that return TypeModifier and TypeMethodDescriptionLocalVariableInfo.getType(int offset) Gets the type of the local variable that uses this local variable slot at the given bytecode offset.Methods in org.apache.bcel.verifier.statics with parameters of type TypeModifier and TypeMethodDescriptionvoidAdds some information about this local variable (slot).voidAdds information about the local variable in slot 'slot'. -
Uses of Type in org.apache.bcel.verifier.structurals
Subclasses of Type in org.apache.bcel.verifier.structuralsModifier and TypeClassDescriptionclassThis class represents an uninitialized object type; see The Java Virtual Machine Specification, Second Edition, page 147: 4.9.4 for more details.Methods in org.apache.bcel.verifier.structurals that return TypeModifier and TypeMethodDescriptionLocalVariables.get(int slotIndex) Returns the type of the local variable slot index.OperandStack.peek()Returns the element on top of the stack.OperandStack.peek(int depth) Returns the element that's i elements below the top element; that means, iff i==0 the top element is returned.OperandStack.pop()Returns the element on top of the stack.OperandStack.pop(int count) Pops i elements off the stack.Methods in org.apache.bcel.verifier.structurals with parameters of type TypeModifier and TypeMethodDescriptionvoidPass3bVerifier.invalidReturnTypeError(Type returnedType, MethodGen m) Always throwsStructuralCodeConstraintExceptionbecause the returned type is incompatible with the method return type.voidPushes a Type object onto the stack.voidSets a new Type for the given local variable slot.