Class AsmUtil


  • final class AsmUtil
    extends java.lang.Object
    • Constructor Detail

      • AsmUtil

        private AsmUtil()
    • Method Detail

      • newTraceMethodVisitor

        public static org.objectweb.asm.MethodVisitor newTraceMethodVisitor​(org.objectweb.asm.MethodVisitor mv)
      • newTraceClassVisitor

        public static org.objectweb.asm.ClassVisitor newTraceClassVisitor​(org.objectweb.asm.ClassVisitor cv,
                                                                          java.io.OutputStream out)
      • newTraceClassVisitor

        public static org.objectweb.asm.ClassVisitor newTraceClassVisitor​(org.objectweb.asm.ClassVisitor cv,
                                                                          java.io.PrintWriter out)
      • newTraceClassVisitor

        public static org.objectweb.asm.ClassVisitor newTraceClassVisitor​(java.io.PrintWriter out)
      • newCheckClassAdapter

        public static org.objectweb.asm.ClassVisitor newCheckClassAdapter​(org.objectweb.asm.ClassVisitor cv)
      • unboxedReturnType

        public static java.lang.Class unboxedReturnType​(java.lang.Class type)
      • unboxedType

        public static java.lang.Class unboxedType​(java.lang.Class boxedType)
      • boxedType

        public static java.lang.Class boxedType​(java.lang.Class type)
      • emitReturnOp

        static void emitReturnOp​(SkinnyMethodAdapter mv,
                                 java.lang.Class returnType)
      • calculateLocalVariableSpace

        static int calculateLocalVariableSpace​(java.lang.Class type)
        Calculates the size of a local variable
        Parameters:
        type - The type of parameter
        Returns:
        The size in parameter units
      • calculateLocalVariableSpace

        static int calculateLocalVariableSpace​(SigType type)
        Calculates the size of a local variable
        Parameters:
        type - The type of parameter
        Returns:
        The size in parameter units
      • calculateLocalVariableSpace

        static int calculateLocalVariableSpace​(java.lang.Class... types)
        Calculates the size of a list of types in the local variable area.
        Parameters:
        types - The type of parameter
        Returns:
        The size in parameter units
      • calculateLocalVariableSpace

        static int calculateLocalVariableSpace​(SigType... types)
        Calculates the size of a list of types in the local variable area.
        Parameters:
        types - The type of parameter
        Returns:
        The size in parameter units
      • unboxPointerOrStruct

        private static void unboxPointerOrStruct​(SkinnyMethodAdapter mv,
                                                 java.lang.Class type,
                                                 java.lang.Class nativeType)
      • unboxPointer

        static void unboxPointer​(SkinnyMethodAdapter mv,
                                 java.lang.Class nativeType)
      • unboxBoolean

        static void unboxBoolean​(SkinnyMethodAdapter mv,
                                 java.lang.Class boxedType,
                                 java.lang.Class nativeType)
      • unboxBoolean

        static void unboxBoolean​(SkinnyMethodAdapter mv,
                                 java.lang.Class nativeType)
      • unboxNumber

        static void unboxNumber​(SkinnyMethodAdapter mv,
                                java.lang.Class boxedType,
                                java.lang.Class unboxedType,
                                NativeType nativeType)
      • unboxNumber

        static void unboxNumber​(SkinnyMethodAdapter mv,
                                java.lang.Class boxedType,
                                java.lang.Class nativeType)
      • getNativeArrayFlags

        static int getNativeArrayFlags​(int flags)
      • getNativeArrayFlags

        static int getNativeArrayFlags​(java.util.Collection<java.lang.annotation.Annotation> annotations)
      • getParameterVariables

        static LocalVariable[] getParameterVariables​(java.lang.Class[] parameterTypes)
      • emitReturn

        static void emitReturn​(AsmBuilder builder,
                               SkinnyMethodAdapter mv,
                               java.lang.Class returnType,
                               java.lang.Class nativeIntType)
      • tryfinally

        static void tryfinally​(SkinnyMethodAdapter mv,
                               java.lang.Runnable codeBlock,
                               java.lang.Runnable finallyBlock)
      • getToNativeMethod

        static java.lang.reflect.Method getToNativeMethod​(ToNativeType toNativeType,
                                                          AsmClassLoader classLoader)
      • methodIsAccessible

        static boolean methodIsAccessible​(java.lang.reflect.Method method)
      • classIsVisible

        private static boolean classIsVisible​(java.lang.ClassLoader classLoader,
                                              java.lang.Class klass)