Uses of Class
org.apache.bcel.generic.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
Modifier and TypeMethodDescriptionType[]
Method.getArgumentTypes()
Method.getReturnType()
Field.getType()
See https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.2.2 -
Uses of Type in org.apache.bcel.generic
Modifier and TypeClassDescriptionfinal class
Denotes array type, such as int[][]final class
Denotes basic type such as int.class
Denotes reference such asString
.class
Super class for object and array types.class
Returnaddress, the type JSR or JSR_W instructions push upon the stack.Modifier and TypeFieldDescriptionstatic final Type[]
Type.NO_ARGS
Empty array.protected Type
FieldGenOrMethodGen.type
Deprecated.(since 6.0) will be made private; do not access directly, use getter/setterstatic final Type
Type.UNKNOWN
Modifier and TypeMethodDescriptionMethodGen.getArgumentType
(int i) Type[]
InvokeInstruction.getArgumentTypes
(ConstantPoolGen cpg) Type[]
MethodGen.getArgumentTypes()
static Type[]
Type.getArgumentTypes
(String signature) Convert arguments of a method (signature) to an array of Type objects.ArrayType.getBasicType()
ArrayType.getElementType()
FieldInstruction.getFieldType
(ConstantPoolGen cpg) InvokeInstruction.getReturnType
(ConstantPoolGen cpg) MethodGen.getReturnType()
static Type
Type.getReturnType
(String signature) Convert return value of a method (signature) to a Type object.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) FieldGenOrMethodGen.getType()
FieldInstruction.getType
(ConstantPoolGen cpg) ICONST.getType
(ConstantPoolGen cp) IINC.getType
(ConstantPoolGen cp) InvokeInstruction.getType
(ConstantPoolGen cpg) 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.LocalVariableGen.getType()
LocalVariableInstruction.getType
(ConstantPoolGen cp) Returns the type associated with the instruction - in case of ALOAD or ASTORE Type.OBJECT is returned.NamedAndTyped.getType()
final Type
NEWARRAY.getType()
RET.getType
(ConstantPoolGen cp) ReturnInstruction.getType()
ReturnInstruction.getType
(ConstantPoolGen cp) SIPUSH.getType
(ConstantPoolGen cp) StackInstruction.getType
(ConstantPoolGen cp) static Type
Convert runtimeClass
to BCEL Type object.static Type
Convert signature to a Type object.TypedInstruction.getType
(ConstantPoolGen cpg) static Type[]
Convert runtimejava.lang.Class[]
to BCEL Type objects.Type.normalizeForStackOrLocal()
boolean, short and char variable are considered as int in the stack or local variable area.Modifier 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) static ArrayInstruction
InstructionFactory.createArrayLoad
(Type type) static ArrayInstruction
InstructionFactory.createArrayStore
(Type type) static ArithmeticInstruction
InstructionFactory.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, e.g., 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) InstructionFactory.createGetStatic
(String className, String name, Type t) 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 LocalVariableInstruction
InstructionFactory.createLoad
(Type type, int index) InstructionFactory.createNewArray
(Type t, short dim) Create new array of given size and type.static Instruction
InstructionFactory.createNull
(Type type) Create "null" value for reference types, 0 for basic types like intInstructionFactory.createPutField
(String className, String name, Type t) InstructionFactory.createPutStatic
(String className, String name, Type t) static ReturnInstruction
InstructionFactory.createReturn
(Type type) Create typed returnstatic LocalVariableInstruction
InstructionFactory.createStore
(Type type, int index) static String
Type.getMethodSignature
(Type returnType, Type[] argTypes) Convert type to Java method signature, e.g.boolean
ReferenceType.isAssignmentCompatibleWith
(Type t) Return true iff this is assignment compatible with another type t as defined in the JVM specification; see the AASTORE definition there.boolean
ReferenceType.isCastableTo
(Type t) Return true iff this type is castable to another type t as defined in the JVM specification.void
MethodGen.setArgumentType
(int i, Type type) void
MethodGen.setArgumentTypes
(Type[] argTypes) void
MethodGen.setReturnType
(Type returnType) void
void
void
ModifierConstructorDescriptionConstructor 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) Generate a local variable that with index 'index'.LocalVariableGen
(int index, String name, Type type, InstructionHandle start, InstructionHandle end, int origIndex) Generates a local variable that with index '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
Modifier and TypeClassDescriptionfinal class
This class represents the upper half of a DOUBLE variable.final class
This class represents the upper half of a LONG variable.Modifier and TypeMethodDescriptionLocalVariableInfo.getType
(int offset) Returns the type of the local variable that uses this local variable slot at the given bytecode offset.Modifier and TypeMethodDescriptionvoid
Adds some information about this local variable (slot).void
Adds information about the local variable in slot 'slot'. -
Uses of Type in org.apache.bcel.verifier.structurals
Modifier and TypeClassDescriptionclass
This class represents an uninitialized object type; see The Java Virtual Machine Specification, Second Edition, page 147: 4.9.4 for more details.Modifier 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 i) 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.Modifier and TypeMethodDescriptionvoid
Pass3bVerifier.invalidReturnTypeError
(Type returnedType, MethodGen m) Throws an exception indicating the returned type is not compatible with the return type of the given method.void
Pushes a Type object onto the stack.void
Sets a new Type for the given local variable slot.