Package | Description |
---|---|
org.objectweb.asm |
Provides a small and fast bytecode manipulation framework.
|
org.objectweb.asm.commons |
Provides some useful class and method adapters.
|
org.objectweb.asm.tree.analysis |
Provides a framework for static code analysis based on the asm.tree package.
|
org.objectweb.asm.util |
Provides ASM visitors that can be useful for programming and
debugging purposes.
|
Modifier and Type | Field and Description |
---|---|
static Type |
Type.BOOLEAN_TYPE
The
boolean type. |
static Type |
Type.BYTE_TYPE
The
byte type. |
static Type |
Type.CHAR_TYPE
The
char type. |
static Type |
Type.DOUBLE_TYPE
The
double type. |
static Type |
Type.FLOAT_TYPE
The
float type. |
static Type |
Type.INT_TYPE
The
int type. |
static Type |
Type.LONG_TYPE
The
long type. |
static Type |
Type.SHORT_TYPE
The
short type. |
static Type |
Type.VOID_TYPE
The
void type. |
Modifier and Type | Method and Description |
---|---|
Type[] |
Type.getArgumentTypes()
Returns the argument types of methods of this type.
|
static Type[] |
Type.getArgumentTypes(java.lang.reflect.Method method)
Returns the
Type values corresponding to the argument types of the given method. |
static Type[] |
Type.getArgumentTypes(java.lang.String methodDescriptor)
Returns the
Type values corresponding to the argument types of the given method
descriptor. |
Type |
Type.getElementType()
Returns the type of the elements of this array type.
|
static Type |
Type.getMethodType(java.lang.String methodDescriptor)
Returns the
Type corresponding to the given method descriptor. |
static Type |
Type.getMethodType(Type returnType,
Type... argumentTypes)
Returns the method
Type corresponding to the given argument and return types. |
static Type |
Type.getObjectType(java.lang.String internalName)
Returns the
Type corresponding to the given internal name. |
Type |
Type.getReturnType()
Returns the return type of methods of this type.
|
static Type |
Type.getReturnType(java.lang.reflect.Method method)
Returns the
Type corresponding to the return type of the given method. |
static Type |
Type.getReturnType(java.lang.String methodDescriptor)
Returns the
Type corresponding to the return type of the given method descriptor. |
static Type |
Type.getType(java.lang.Class<?> clazz)
Returns the
Type corresponding to the given class. |
static Type |
Type.getType(java.lang.reflect.Constructor<?> constructor)
Returns the method
Type corresponding to the given constructor. |
static Type |
Type.getType(java.lang.reflect.Method method)
Returns the method
Type corresponding to the given method. |
static Type |
Type.getType(java.lang.String typeDescriptor)
Returns the
Type corresponding to the given type descriptor. |
private static Type |
Type.getTypeInternal(java.lang.String descriptorBuffer,
int descriptorBegin,
int descriptorEnd)
Returns the
Type corresponding to the given field or method descriptor. |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
Type.getMethodDescriptor(Type returnType,
Type... argumentTypes)
Returns the descriptor corresponding to the given argument and return types.
|
static java.lang.String |
Type.getMethodDescriptor(Type returnType,
Type... argumentTypes)
Returns the descriptor corresponding to the given argument and return types.
|
static Type |
Type.getMethodType(Type returnType,
Type... argumentTypes)
Returns the method
Type corresponding to the given argument and return types. |
static Type |
Type.getMethodType(Type returnType,
Type... argumentTypes)
Returns the method
Type corresponding to the given argument and return types. |
Modifier and Type | Field and Description |
---|---|
private Type[] |
GeneratorAdapter.argumentTypes
The argument types of the visited method.
|
private static Type |
GeneratorAdapter.BOOLEAN_TYPE |
private static Type |
GeneratorAdapter.BYTE_TYPE |
private static Type |
GeneratorAdapter.CHARACTER_TYPE |
private static Type |
GeneratorAdapter.DOUBLE_TYPE |
private static Type |
GeneratorAdapter.FLOAT_TYPE |
private static Type |
GeneratorAdapter.INTEGER_TYPE |
private static Type |
GeneratorAdapter.LONG_TYPE |
private static Type |
GeneratorAdapter.NUMBER_TYPE |
private static Type |
LocalVariablesSorter.OBJECT_TYPE
The type of the java.lang.Object class.
|
static Type |
InstructionAdapter.OBJECT_TYPE
The type of the java.lang.Object class.
|
private static Type |
GeneratorAdapter.OBJECT_TYPE |
private Type |
GeneratorAdapter.returnType
The return type of the visited method.
|
private static Type |
GeneratorAdapter.SHORT_TYPE |
Modifier and Type | Field and Description |
---|---|
private java.util.List<Type> |
GeneratorAdapter.localTypes
The types of the local variables of the visited method.
|
Modifier and Type | Method and Description |
---|---|
Type[] |
Method.getArgumentTypes()
Returns the argument types of the method described by this object.
|
Type[] |
GeneratorAdapter.getArgumentTypes() |
private static Type |
GeneratorAdapter.getBoxedType(Type type) |
Type |
GeneratorAdapter.getLocalType(int local)
Returns the type of the given local variable.
|
Type |
Method.getReturnType()
Returns the return type of the method described by this object.
|
Type |
GeneratorAdapter.getReturnType() |
private Type |
Remapper.mapType(Type type)
|
Modifier and Type | Method and Description |
---|---|
void |
InstructionAdapter.add(Type type) |
void |
InstructionAdapter.aload(Type type) |
void |
InstructionAdapter.and(Type type) |
void |
InstructionAdapter.anew(Type type) |
void |
InstructionAdapter.areturn(Type type) |
void |
GeneratorAdapter.arrayLoad(Type type)
Generates the instruction to load an element from an array.
|
void |
GeneratorAdapter.arrayStore(Type type)
Generates the instruction to store an element in an array.
|
void |
InstructionAdapter.astore(Type type) |
void |
GeneratorAdapter.box(Type type)
Generates the instructions to box the top stack value.
|
(package private) static void |
InstructionAdapter.cast(MethodVisitor methodVisitor,
Type from,
Type to)
Generates the instruction to cast from the first given type to the other.
|
void |
InstructionAdapter.cast(Type from,
Type to)
Generates the instruction to cast from the first given type to the other.
|
void |
GeneratorAdapter.cast(Type from,
Type to)
Generates the instructions to cast a numerical value from one type to another.
|
void |
GeneratorAdapter.catchException(Label start,
Label end,
Type exception)
Marks the start of an exception handler.
|
void |
InstructionAdapter.checkcast(Type type) |
void |
GeneratorAdapter.checkCast(Type type)
Generates the instruction to check that the top stack value is of the given type.
|
void |
InstructionAdapter.cmpg(Type type) |
void |
InstructionAdapter.cmpl(Type type) |
void |
InstructionAdapter.div(Type type) |
private void |
GeneratorAdapter.fieldInsn(int opcode,
Type ownerType,
java.lang.String name,
Type fieldType)
Generates a get field or set field instruction.
|
private static Type |
GeneratorAdapter.getBoxedType(Type type) |
void |
GeneratorAdapter.getField(Type owner,
java.lang.String name,
Type type)
Generates the instruction to push the value of a non static field on the stack.
|
private static java.lang.String[] |
GeneratorAdapter.getInternalNames(Type[] types)
Returns the internal names of the given types.
|
void |
GeneratorAdapter.getStatic(Type owner,
java.lang.String name,
Type type)
Generates the instruction to push the value of a static field on the stack.
|
void |
GeneratorAdapter.ifCmp(Type type,
int mode,
Label label)
Generates the instructions to jump to a label based on the comparison of the top two stack
values.
|
void |
InstructionAdapter.instanceOf(Type type) |
void |
GeneratorAdapter.instanceOf(Type type)
Generates the instruction to test if the top stack value is of the given type.
|
void |
GeneratorAdapter.invokeConstructor(Type type,
Method method)
Generates the instruction to invoke a constructor.
|
private void |
GeneratorAdapter.invokeInsn(int opcode,
Type type,
Method method,
boolean isInterface)
Generates an invoke method instruction.
|
void |
GeneratorAdapter.invokeInterface(Type owner,
Method method)
Generates the instruction to invoke an interface method.
|
void |
GeneratorAdapter.invokeStatic(Type owner,
Method method)
Generates the instruction to invoke a static method.
|
void |
GeneratorAdapter.invokeVirtual(Type owner,
Method method)
Generates the instruction to invoke a normal method.
|
void |
InstructionAdapter.load(int var,
Type type) |
private void |
GeneratorAdapter.loadInsn(Type type,
int index)
Generates the instruction to push a local variable on the stack.
|
void |
GeneratorAdapter.loadLocal(int local,
Type type)
Generates the instruction to load the given local variable on the stack.
|
private Type |
Remapper.mapType(Type type)
|
void |
GeneratorAdapter.math(int op,
Type type)
Generates the instruction to do the specified mathematical or logical operation.
|
void |
InstructionAdapter.mul(Type type) |
void |
InstructionAdapter.neg(Type type) |
(package private) static void |
InstructionAdapter.newarray(MethodVisitor methodVisitor,
Type type)
Generates the instruction to create and push on the stack an array of the given type.
|
void |
InstructionAdapter.newarray(Type type)
Generates the instruction to create and push on the stack an array of the given type.
|
void |
GeneratorAdapter.newArray(Type type)
Generates the instruction to create a new array.
|
void |
GeneratorAdapter.newInstance(Type type)
Generates the instruction to create a new object.
|
int |
LocalVariablesSorter.newLocal(Type type)
Constructs a new local variable of the given type.
|
protected int |
LocalVariablesSorter.newLocalMapping(Type type) |
void |
InstructionAdapter.or(Type type) |
void |
GeneratorAdapter.push(Type value)
Generates the instruction to push the given value on the stack.
|
void |
GeneratorAdapter.putField(Type owner,
java.lang.String name,
Type type)
Generates the instruction to store the top stack value in a non static field.
|
void |
GeneratorAdapter.putStatic(Type owner,
java.lang.String name,
Type type)
Generates the instruction to store the top stack value in a static field.
|
void |
InstructionAdapter.rem(Type type) |
private int |
LocalVariablesSorter.remap(int var,
Type type) |
protected void |
LocalVariablesSorter.setLocalType(int local,
Type type)
Notifies subclasses that a local variable has been added or remapped.
|
protected void |
GeneratorAdapter.setLocalType(int local,
Type type) |
void |
InstructionAdapter.shl(Type type) |
void |
InstructionAdapter.shr(Type type) |
void |
InstructionAdapter.store(int var,
Type type) |
private void |
GeneratorAdapter.storeInsn(Type type,
int index)
Generates the instruction to store the top stack value in a local variable.
|
void |
GeneratorAdapter.storeLocal(int local,
Type type)
Generates the instruction to store the top stack value in the given local variable.
|
void |
InstructionAdapter.sub(Type type) |
void |
GeneratorAdapter.swap(Type prev,
Type type)
Generates the instructions to swap the top two stack values.
|
void |
InstructionAdapter.tconst(Type type)
Generates the instruction to push the given type on the stack.
|
void |
GeneratorAdapter.throwException(Type type,
java.lang.String message)
Generates the instructions to create and throw an exception.
|
private void |
GeneratorAdapter.typeInsn(int opcode,
Type type)
Generates a type dependent instruction.
|
void |
GeneratorAdapter.unbox(Type type)
Generates the instructions to unbox the top stack value.
|
void |
InstructionAdapter.ushr(Type type) |
void |
GeneratorAdapter.valueOf(Type type)
Generates the instructions to box the top stack value using Java 5's valueOf() method.
|
void |
InstructionAdapter.xor(Type type) |
Constructor and Description |
---|
GeneratorAdapter(int access,
Method method,
java.lang.String signature,
Type[] exceptions,
ClassVisitor classVisitor)
Constructs a new
GeneratorAdapter . |
Method(java.lang.String name,
Type returnType,
Type[] argumentTypes)
Constructs a new
Method . |
Method(java.lang.String name,
Type returnType,
Type[] argumentTypes)
Constructs a new
Method . |
Modifier and Type | Field and Description |
---|---|
private Type |
SimpleVerifier.currentClass
The type of the class that is verified.
|
private Type |
SimpleVerifier.currentSuperClass
The type of the super class of the class that is verified.
|
static Type |
BasicInterpreter.NULL_TYPE
Special type used for the null literal.
|
private Type |
BasicValue.type
The
Type of this value, or null for uninitialized values. |
Modifier and Type | Field and Description |
---|---|
private java.util.List<Type> |
SimpleVerifier.currentClassInterfaces
The types of the interfaces directly implemented by the class that is verified.
|
Modifier and Type | Method and Description |
---|---|
protected Type |
SimpleVerifier.getSuperClass(Type type)
Returns the type corresponding to the super class of the given type.
|
Type |
BasicValue.getType()
Returns the
Type of this value. |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Class<?> |
SimpleVerifier.getClass(Type type)
Loads the class corresponding to the given type.
|
protected Type |
SimpleVerifier.getSuperClass(Type type)
Returns the type corresponding to the super class of the given type.
|
protected boolean |
SimpleVerifier.isAssignableFrom(Type type1,
Type type2)
Returns whether the class corresponding to the first argument is either the same as, or is a
superclass or superinterface of the class corresponding to the second argument.
|
protected boolean |
SimpleVerifier.isInterface(Type type)
Returns whether the given type corresponds to the type of an interface.
|
private BasicValue |
SimpleVerifier.newArrayValue(Type type,
int dimensions) |
V |
Interpreter.newExceptionValue(TryCatchBlockNode tryCatchBlockNode,
Frame<V> handlerFrame,
Type exceptionType)
Creates a new value that represents the given exception type.
|
V |
Interpreter.newParameterValue(boolean isInstanceMethod,
int local,
Type type)
Creates a new value that represents the given parameter type.
|
V |
Interpreter.newReturnTypeValue(Type type)
Creates a new value that represents the given return type.
|
BasicValue |
BasicInterpreter.newValue(Type type) |
SourceValue |
SourceInterpreter.newValue(Type type) |
BasicValue |
SimpleVerifier.newValue(Type type) |
abstract V |
Interpreter.newValue(Type type)
Creates a new value that represents the given type.
|
Constructor and Description |
---|
BasicValue(Type type)
Constructs a new
BasicValue of the given type. |
SimpleVerifier(int api,
Type currentClass,
Type currentSuperClass,
java.util.List<Type> currentClassInterfaces,
boolean isInterface)
Constructs a new
SimpleVerifier to verify a specific class. |
SimpleVerifier(Type currentClass,
Type currentSuperClass,
boolean isInterface)
Constructs a new
SimpleVerifier to verify a specific class. |
SimpleVerifier(Type currentClass,
Type currentSuperClass,
java.util.List<Type> currentClassInterfaces,
boolean isInterface)
Constructs a new
SimpleVerifier to verify a specific class. |
Constructor and Description |
---|
SimpleVerifier(int api,
Type currentClass,
Type currentSuperClass,
java.util.List<Type> currentClassInterfaces,
boolean isInterface)
Constructs a new
SimpleVerifier to verify a specific class. |
SimpleVerifier(Type currentClass,
Type currentSuperClass,
java.util.List<Type> currentClassInterfaces,
boolean isInterface)
Constructs a new
SimpleVerifier to verify a specific class. |
Modifier and Type | Method and Description |
---|---|
private void |
Textifier.visitType(Type value) |