public class BytecodeUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ANNOTATION |
static String |
BOOLEAN_CLASS_DESCRIPTOR |
static String |
BYTE_CLASS_DESCRIPTOR |
static String |
CHAR_CLASS_DESCRIPTOR |
static String |
DOUBLE_CLASS_DESCRIPTOR |
static int |
ENUM |
static String |
FLOAT_CLASS_DESCRIPTOR |
static String |
INT_CLASS_DESCRIPTOR |
static String |
LONG_CLASS_DESCRIPTOR |
static String |
SHORT_CLASS_DESCRIPTOR |
static String |
VOID_CLASS_DESCRIPTOR |
Modifier and Type | Method and Description |
---|---|
static void |
addLoadInstruction(org.jboss.classfilewriter.code.CodeAttribute code,
String type,
int variable)
Adds the correct load instruction based on the type descriptor
|
static void |
pushClassType(org.jboss.classfilewriter.code.CodeAttribute b,
String classType)
Pushes a class type onto the stack from the string representation This can
also handle primitives
|
public static final String VOID_CLASS_DESCRIPTOR
public static final String BYTE_CLASS_DESCRIPTOR
public static final String CHAR_CLASS_DESCRIPTOR
public static final String DOUBLE_CLASS_DESCRIPTOR
public static final String FLOAT_CLASS_DESCRIPTOR
public static final String INT_CLASS_DESCRIPTOR
public static final String LONG_CLASS_DESCRIPTOR
public static final String SHORT_CLASS_DESCRIPTOR
public static final String BOOLEAN_CLASS_DESCRIPTOR
public static final int ENUM
public static final int ANNOTATION
public static void addLoadInstruction(org.jboss.classfilewriter.code.CodeAttribute code, String type, int variable)
code
- the bytecode to add the instruction totype
- the type of the variablevariable
- the variable numberpublic static void pushClassType(org.jboss.classfilewriter.code.CodeAttribute b, String classType)
b
- the bytecodeclassType
- the type descriptor for the class or primitive to push.
This will accept both the java.lang.Object form and the
Ljava/lang/Object; formCopyright © 2019. All rights reserved.