Top Description Constructors Methods
com.google.inject.internal.aop

pack-priv final Class BytecodeTasks

extends Object
Class Inheritance
Static Imports
org.objectweb.asm.Opcodes.AALOAD, .Opcodes.AASTORE, .Opcodes.ALOAD, .Opcodes.ANEWARRAY, .Opcodes.BIPUSH, .Opcodes.CHECKCAST, .Opcodes.DUP, .Opcodes.ICONST_0, .Opcodes.ILOAD, .Opcodes.INVOKESTATIC, .Opcodes.INVOKEVIRTUAL, .Opcodes.SIPUSH

Utility methods to generate common bytecode tasks.
Author
[email protected] (Stuart McCulloch)

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
box(MethodVisitor mv, Type primitiveType)

Boxes a primitive value on the Java stack.

public static int
loadArgument(MethodVisitor mv, Class<?> parameterType, int slot)

Loads a local argument onto the Java stack and returns the size of the argument.

public static void
packArguments(MethodVisitor mv, Class<?>[] parameterTypes)

Packs local arguments into an argument array on the Java stack.

public static void
pushInteger(MethodVisitor mv, int value)

Pushes an integer onto the stack, choosing the most efficient opcode.

public static void
unbox(MethodVisitor mv, Type primitiveType)

Unboxes a boxed value on the Java stack.

public static void
unpackArguments(MethodVisitor mv, Class<?>[] parameterTypes)

Unpacks an array of arguments and pushes them onto the Java stack.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BytecodeTasksback to summary
private BytecodeTasks()

Method Detail

boxback to summary
public static void box(MethodVisitor mv, Type primitiveType)

Boxes a primitive value on the Java stack.

loadArgumentback to summary
public static int loadArgument(MethodVisitor mv, Class<?> parameterType, int slot)

Loads a local argument onto the Java stack and returns the size of the argument.

packArgumentsback to summary
public static void packArguments(MethodVisitor mv, Class<?>[] parameterTypes)

Packs local arguments into an argument array on the Java stack.

pushIntegerback to summary
public static void pushInteger(MethodVisitor mv, int value)

Pushes an integer onto the stack, choosing the most efficient opcode.

unboxback to summary
public static void unbox(MethodVisitor mv, Type primitiveType)

Unboxes a boxed value on the Java stack.

unpackArgumentsback to summary
public static void unpackArguments(MethodVisitor mv, Class<?>[] parameterTypes)

Unpacks an array of arguments and pushes them onto the Java stack.