Package com.google.inject.internal.aop
Class BytecodeTasks
java.lang.Object
com.google.inject.internal.aop.BytecodeTasks
Utility methods to generate common bytecode tasks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
box
(org.objectweb.asm.MethodVisitor mv, org.objectweb.asm.Type primitiveType) Boxes a primitive value on the Java stack.static int
loadArgument
(org.objectweb.asm.MethodVisitor mv, Class<?> parameterType, int slot) Loads a local argument onto the Java stack and returns the size of the argument.static void
packArguments
(org.objectweb.asm.MethodVisitor mv, Class<?>[] parameterTypes) Packs local arguments into an argument array on the Java stack.static void
pushInteger
(org.objectweb.asm.MethodVisitor mv, int value) Pushes an integer onto the stack, choosing the most efficient opcode.static void
unbox
(org.objectweb.asm.MethodVisitor mv, org.objectweb.asm.Type primitiveType) Unboxes a boxed value on the Java stack.static void
unpackArguments
(org.objectweb.asm.MethodVisitor mv, Class<?>[] parameterTypes) Unpacks an array of arguments and pushes them onto the Java stack.
-
Constructor Details
-
BytecodeTasks
private BytecodeTasks()
-
-
Method Details
-
pushInteger
public static void pushInteger(org.objectweb.asm.MethodVisitor mv, int value) Pushes an integer onto the stack, choosing the most efficient opcode. -
packArguments
Packs local arguments into an argument array on the Java stack. -
unpackArguments
Unpacks an array of arguments and pushes them onto the Java stack. -
loadArgument
public static int loadArgument(org.objectweb.asm.MethodVisitor mv, Class<?> parameterType, int slot) Loads a local argument onto the Java stack and returns the size of the argument. -
box
public static void box(org.objectweb.asm.MethodVisitor mv, org.objectweb.asm.Type primitiveType) Boxes a primitive value on the Java stack. -
unbox
public static void unbox(org.objectweb.asm.MethodVisitor mv, org.objectweb.asm.Type primitiveType) Unboxes a boxed value on the Java stack.
-