Class BytecodeTasks

java.lang.Object
com.google.inject.internal.aop.BytecodeTasks

final class BytecodeTasks extends Object
Utility methods to generate common bytecode tasks.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static void packArguments(org.objectweb.asm.MethodVisitor mv, Class<?>[] parameterTypes)
      Packs local arguments into an argument array on the Java stack.
    • unpackArguments

      public static void unpackArguments(org.objectweb.asm.MethodVisitor mv, Class<?>[] parameterTypes)
      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.