Package org.jboss.weld.util.bytecode
Class BytecodeUtils
java.lang.Object
org.jboss.weld.util.bytecode.BytecodeUtils
utility class for common bytecode operations
- Author:
- Stuart Douglas
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddLoadInstruction(org.jboss.classfilewriter.code.CodeAttribute code, String type, int variable) Adds the correct load instruction based on the type descriptorstatic Stringstatic voidpushClassType(org.jboss.classfilewriter.code.CodeAttribute b, String classType) Pushes a class type onto the stack from the string representation This can also handle primitives
-
Field Details
-
VOID_CLASS_DESCRIPTOR
- See Also:
-
BYTE_CLASS_DESCRIPTOR
- See Also:
-
CHAR_CLASS_DESCRIPTOR
- See Also:
-
DOUBLE_CLASS_DESCRIPTOR
- See Also:
-
FLOAT_CLASS_DESCRIPTOR
- See Also:
-
INT_CLASS_DESCRIPTOR
- See Also:
-
LONG_CLASS_DESCRIPTOR
- See Also:
-
SHORT_CLASS_DESCRIPTOR
- See Also:
-
BOOLEAN_CLASS_DESCRIPTOR
- See Also:
-
ENUM
public static final int ENUM- See Also:
-
ANNOTATION
public static final int ANNOTATION- See Also:
-
-
Method Details
-
addLoadInstruction
public static void addLoadInstruction(org.jboss.classfilewriter.code.CodeAttribute code, String type, int variable) Adds the correct load instruction based on the type descriptor- Parameters:
code- the bytecode to add the instruction totype- the type of the variablevariable- the variable number
-
pushClassType
Pushes a class type onto the stack from the string representation This can also handle primitives- Parameters:
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; form
-
getName
-