| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private abstract static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| public static boolean | box(MethodVisitor mv, ClassNode type)
Deprecated
Generates the bytecode to autobox the current value on the stack.
|
| public static boolean | box(MethodVisitor mv, Class<T> type)
Deprecated
Generates the bytecode to autobox the current value on the stack.
|
| private static void | |
| private static void | |
| private static void | |
| public static void | convertPrimitiveToBoolean(MethodVisitor
method visitor mv, ClassNode primitive type to convert type)Converts a primitive type to boolean. |
| public static void | |
| public static void | |
| public static void | doCastToPrimitive(MethodVisitor
method visitor mv, ClassNode the wrapped number type sourceType, ClassNode the primitive target type targetType)Given a wrapped number type (Byte, Integer, Short, ...), generates bytecode to convert it to a primitive number (int, long, double) using calls to wrapped.[targetType]Value() |
| public static void | doCastToWrappedType(MethodVisitor
method visitor mv, ClassNode the primitive number type sourceType, ClassNode the wrapped target type targetType)Given a primitive number type (byte, integer, short, ...), generates bytecode to convert it to a wrapped number (Integer, Long, Double) using calls to [WrappedType].valueOf |
| public static void | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String[] | |
| public static String | Returns: the ASM type description for class loadingarray types are special: eg.: String[]: classname: [Ljava.lang.String; Object: classname: java.lang.Object int[] : classname: [I unlike getTypeDescription '.' is not replaced by '/'. |
| public static String | |
| public static String | |
| public static String | |
| private static void | |
| public static String | Returns: a method descriptor as defined in section JVMS section 4.3.3the method node for which to create the descriptor methodNode)Returns a method descriptor for the given |
| public static String | Returns: the ASM method type descriptor
|
| public static String | Returns: the ASM method type descriptor
|
| public static String | Returns: the ASM method type descriptor
|
| public static String | |
| public static String | Returns: the ASM type descriptionarray types are special: eg.: String[]: classname: [Ljava/lang/String; int[]: [I |
| private static String | Returns: the ASM type descriptionarray types are special: eg.: String[]: classname: [Ljava/lang/String; int[]: [I |
| private static boolean | |
| private static boolean | |
| public static int | |
| public static boolean | Returns: true if the bytecode can be optimizedthe classnode for which we want to know if bytecode optimization is possible classNode)Tells if a class node is candidate for class literal bytecode optimization. |
| public static boolean | Returns: true if both classes share the same compilation unitclass a a, ClassNode class b b)Returns true if the two classes share the same compilation unit. |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | unbox(MethodVisitor mv, ClassNode type)
Generates the bytecode to unbox the current value on the stack. |
| public static void | unbox(MethodVisitor mv, Class<T> type)
Generates the bytecode to unbox the current value on the stack. |
| private static void | |
| private static boolean | |
| public static void | |
| private static void | |
| private static void |
| DTT_CLASSNAME | back to summary |
|---|---|
| private static String DTT_CLASSNAME | |
| BytecodeHelper | back to summary |
|---|---|
| public BytecodeHelper() | |
| addSubTypes | back to summary |
|---|---|
| private static void addSubTypes(StringBuilder ret, GenericsType[] types, String start, String end) | |
| box | back to summary |
|---|---|
| public static boolean box(MethodVisitor mv, ClassNode type)
Deprecated
Generates the bytecode to autobox the current value on the stack.
| |
| box | back to summary |
|---|---|
| public static boolean box(MethodVisitor mv, Class<T> type)
Deprecated
Generates the bytecode to autobox the current value on the stack.
| |
| box | back to summary |
|---|---|
| private static void box(MethodVisitor mv, String typeDescription) | |
| convertDoubleToBoolean | back to summary |
|---|---|
| private static void convertDoubleToBoolean(MethodVisitor mv) | |
| convertFloatToBoolean | back to summary |
|---|---|
| private static void convertFloatToBoolean(MethodVisitor mv) | |
| convertPrimitiveToBoolean | back to summary |
|---|---|
| public static void convertPrimitiveToBoolean(MethodVisitor mv, ClassNode type) Converts a primitive type to boolean.
| |
| doCast | back to summary |
|---|---|
| public static void doCast(MethodVisitor mv, ClassNode type) | |
| doCast | back to summary |
|---|---|
| public static void doCast(MethodVisitor mv, Class<T> type) | |
| doCastToPrimitive | back to summary |
|---|---|
| public static void doCastToPrimitive(MethodVisitor mv, ClassNode sourceType, ClassNode targetType) Given a wrapped number type (Byte, Integer, Short, ...), generates bytecode to convert it to a primitive number (int, long, double) using calls to wrapped.[targetType]Value()
| |
| doCastToWrappedType | back to summary |
|---|---|
| public static void doCastToWrappedType(MethodVisitor mv, ClassNode sourceType, ClassNode targetType) Given a primitive number type (byte, integer, short, ...), generates bytecode to convert it to a wrapped number (Integer, Long, Double) using calls to [WrappedType].valueOf
| |
| doReturn | back to summary |
|---|---|
| public static void doReturn(MethodVisitor mv, ClassNode type) | |
| formatNameForClassLoading | back to summary |
|---|---|
| public static String formatNameForClassLoading(String name) returns a name that Class.forName() can take. Notably for arrays: [I, [Ljava.lang.String; etc Regular object type: java.lang.String | |
| getClassInternalName | back to summary |
|---|---|
public static String getClassInternalName(ClassNode t)
| |
| getClassInternalName | back to summary |
|---|---|
public static String getClassInternalName(Class<T> t)
| |
| getClassInternalName | back to summary |
|---|---|
public static String getClassInternalName(String name)
| |
| getClassInternalNames | back to summary |
|---|---|
public static String[] getClassInternalNames(ClassNode[] names)
| |
| getClassLoadingTypeDescription | back to summary |
|---|---|
| public static String getClassLoadingTypeDescription(ClassNode c) array types are special: eg.: String[]: classname: [Ljava.lang.String; Object: classname: java.lang.Object int[] : classname: [I unlike getTypeDescription '.' is not replaced by '/'. it seems that makes problems for the class loading if '.' is replaced by '/'
| |
| getGenericsBounds | back to summary |
|---|---|
| public static String getGenericsBounds(ClassNode type) | |
| getGenericsMethodSignature | back to summary |
|---|---|
| public static String getGenericsMethodSignature(MethodNode node) | |
| getGenericsSignature | back to summary |
|---|---|
| public static String getGenericsSignature(ClassNode node) | |
| getGenericsTypeSpec | back to summary |
|---|---|
| private static void getGenericsTypeSpec(StringBuilder ret, GenericsType[] genericsTypes) | |
| getMethodDescriptor | back to summary |
|---|---|
| public static String getMethodDescriptor(MethodNode methodNode) Returns a method descriptor for the given
| |
| getMethodDescriptor | back to summary |
|---|---|
public static String getMethodDescriptor(ClassNode returnType, Parameter[] parameters)
| |
| getMethodDescriptor | back to summary |
|---|---|
public static String getMethodDescriptor(ClassNode returnType, ClassNode[] parameterTypes)
| |
| getMethodDescriptor | back to summary |
|---|---|
public static String getMethodDescriptor(Class<T> returnType, Class<T>[] paramTypes)
| |
| getTypeDescription | back to summary |
|---|---|
| public static String getTypeDescription(Class<T> c) | |
| getTypeDescription | back to summary |
|---|---|
| public static String getTypeDescription(ClassNode c) array types are special: eg.: String[]: classname: [Ljava/lang/String; int[]: [I
| |
| getTypeDescription | back to summary |
|---|---|
| private static String getTypeDescription(ClassNode c, boolean end) array types are special: eg.: String[]: classname: [Ljava/lang/String; int[]: [I
| |
| hasGenerics | back to summary |
|---|---|
| private static boolean hasGenerics(Parameter[] param) | |
| hasGenerics | back to summary |
|---|---|
| private static boolean hasGenerics(ClassNode type) | |
| hashCode | back to summary |
|---|---|
| public static int hashCode(String str) Computes a hash code for a string. The purpose of this hashcode is to be constant independently of the JDK being used.
| |
| isClassLiteralPossible | back to summary |
|---|---|
| public static boolean isClassLiteralPossible(ClassNode classNode) Tells if a class node is candidate for class literal bytecode optimization. If so, bytecode may use LDC instructions instead of static constant Class fields to retrieve class literals.
| |
| isSameCompilationUnit | back to summary |
|---|---|
| public static boolean isSameCompilationUnit(ClassNode a, ClassNode b) Returns true if the two classes share the same compilation unit. | |
| load | back to summary |
|---|---|
| public static void load(MethodVisitor mv, ClassNode type, int idx) | |
| negateBoolean | back to summary |
|---|---|
| public static void negateBoolean(MethodVisitor mv) Negate a boolean on stack. | |
| pushConstant | back to summary |
|---|---|
| public static void pushConstant(MethodVisitor mv, int value) | |
| store | back to summary |
|---|---|
| public static void store(MethodVisitor mv, ClassNode type, int idx) | |
| unbox | back to summary |
|---|---|
| public static void unbox(MethodVisitor mv, ClassNode type) Generates the bytecode to unbox the current value on the stack. | |
| unbox | back to summary |
|---|---|
| public static void unbox(MethodVisitor mv, Class<T> type) Generates the bytecode to unbox the current value on the stack. | |
| unbox | back to summary |
|---|---|
| private static void unbox(MethodVisitor mv, String typeName, String typeDescription) | |
| usesGenericsInClassSignature | back to summary |
|---|---|
| private static boolean usesGenericsInClassSignature(ClassNode node) | |
| visitClassLiteral | back to summary |
|---|---|
| public static void visitClassLiteral(MethodVisitor mv, ClassNode classNode) Visits a class literal. If the type of the classnode is a primitive type, the generated bytecode will be a GETSTATIC Integer.TYPE. If the classnode is not a primitive type, we will generate a LDC instruction. | |
| writeGenericsBounds | back to summary |
|---|---|
| private static void writeGenericsBounds(StringBuilder ret, GenericsType type, boolean writeInterfaceMarker) | |
| writeGenericsBoundType | back to summary |
|---|---|
| private static void writeGenericsBoundType(StringBuilder ret, ClassNode printType, boolean writeInterfaceMarker) | |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private MethodVisitor |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | |
| protected void | handleIntType()
Implements abstract org. |
| protected void | |
| protected void | |
| protected void |
| LoadVarHandler | back to summary |
|---|---|
| public LoadVarHandler(MethodVisitor mv, ClassNode type, int idx) | |
| handleDoubleType | back to summary |
|---|---|
| protected void handleDoubleType() Implements abstract org.
| |
| handleFloatType | back to summary |
|---|---|
| protected void handleFloatType() Implements abstract org.
| |
| handleIntType | back to summary |
|---|---|
| protected void handleIntType() Implements abstract org. Doc from org. boolean, char, byte, int, short types are handle in the same way
| |
| handleLongType | back to summary |
|---|---|
| protected void handleLongType() Implements abstract org.
| |
| handleRefType | back to summary |
|---|---|
| protected void handleRefType() Implements abstract org.
| |
| handleVoidType | back to summary |
|---|---|
| protected void handleVoidType() Implements abstract org.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void |
| type | back to summary |
|---|---|
| private ClassNode type | |
| PrimitiveTypeHandler | back to summary |
|---|---|
| public PrimitiveTypeHandler(ClassNode type) | |
| handle | back to summary |
|---|---|
| public void handle() | |
| handleDoubleType | back to summary |
|---|---|
| protected abstract void handleDoubleType() | |
| handleFloatType | back to summary |
|---|---|
| protected abstract void handleFloatType() | |
| handleIntType | back to summary |
|---|---|
| protected abstract void handleIntType() boolean, char, byte, int, short types are handle in the same way | |
| handleLongType | back to summary |
|---|---|
| protected abstract void handleLongType() | |
| handleRefType | back to summary |
|---|---|
| protected abstract void handleRefType() | |
| handleVoidType | back to summary |
|---|---|
| protected abstract void handleVoidType() | |
| Modifier and Type | Field and Description |
|---|---|
| private MethodVisitor |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | |
| protected void | handleIntType()
Implements abstract org. |
| protected void | |
| protected void | |
| protected void |
| mv | back to summary |
|---|---|
| private MethodVisitor mv | |
| ReturnVarHandler | back to summary |
|---|---|
| public ReturnVarHandler(MethodVisitor mv, ClassNode type) | |
| handleDoubleType | back to summary |
|---|---|
| protected void handleDoubleType() Implements abstract org.
| |
| handleFloatType | back to summary |
|---|---|
| protected void handleFloatType() Implements abstract org.
| |
| handleIntType | back to summary |
|---|---|
| protected void handleIntType() Implements abstract org. Doc from org. boolean, char, byte, int, short types are handle in the same way
| |
| handleLongType | back to summary |
|---|---|
| protected void handleLongType() Implements abstract org.
| |
| handleRefType | back to summary |
|---|---|
| protected void handleRefType() Implements abstract org.
| |
| handleVoidType | back to summary |
|---|---|
| protected void handleVoidType() Implements abstract org.
| |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private MethodVisitor |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | |
| protected void | handleIntType()
Implements abstract org. |
| protected void | |
| protected void | |
| protected void |
| StoreVarHandler | back to summary |
|---|---|
| public StoreVarHandler(MethodVisitor mv, ClassNode type, int idx) | |
| handleDoubleType | back to summary |
|---|---|
| protected void handleDoubleType() Implements abstract org.
| |
| handleFloatType | back to summary |
|---|---|
| protected void handleFloatType() Implements abstract org.
| |
| handleIntType | back to summary |
|---|---|
| protected void handleIntType() Implements abstract org. Doc from org. boolean, char, byte, int, short types are handle in the same way
| |
| handleLongType | back to summary |
|---|---|
| protected void handleLongType() Implements abstract org.
| |
| handleRefType | back to summary |
|---|---|
| protected void handleRefType() Implements abstract org.
| |
| handleVoidType | back to summary |
|---|---|
| protected void handleVoidType() Implements abstract org.
| |