Class AsmUtil

java.lang.Object
jnr.ffi.provider.jffi.AsmUtil

final class AsmUtil extends Object
  • Constructor Details

    • AsmUtil

      private AsmUtil()
  • Method Details

    • 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, OutputStream out)
    • newTraceClassVisitor

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

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

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

      public static Class unboxedReturnType(Class type)
    • unboxedType

      public static Class unboxedType(Class boxedType)
    • boxedType

      public static Class boxedType(Class type)
    • emitReturnOp

      static void emitReturnOp(SkinnyMethodAdapter mv, Class returnType)
    • calculateLocalVariableSpace

      static int calculateLocalVariableSpace(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(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, Class type, Class nativeType)
    • unboxPointer

      static void unboxPointer(SkinnyMethodAdapter mv, Class nativeType)
    • unboxBoolean

      static void unboxBoolean(SkinnyMethodAdapter mv, Class boxedType, Class nativeType)
    • unboxBoolean

      static void unboxBoolean(SkinnyMethodAdapter mv, Class nativeType)
    • unboxNumber

      static void unboxNumber(SkinnyMethodAdapter mv, Class boxedType, Class unboxedType, NativeType nativeType)
    • unboxNumber

      static void unboxNumber(SkinnyMethodAdapter mv, Class boxedType, Class nativeType)
    • boxValue

      static void boxValue(AsmBuilder builder, SkinnyMethodAdapter mv, Class boxedType, Class unboxedType)
    • getNativeArrayFlags

      static int getNativeArrayFlags(int flags)
    • getNativeArrayFlags

      static int getNativeArrayFlags(Collection<Annotation> annotations)
    • getParameterVariables

      static LocalVariable[] getParameterVariables(ParameterType[] parameterTypes)
    • getParameterVariables

      static LocalVariable[] getParameterVariables(Class[] parameterTypes)
    • load

      static void load(SkinnyMethodAdapter mv, Class parameterType, LocalVariable parameter)
    • store

      static void store(SkinnyMethodAdapter mv, Class type, LocalVariable var)
    • emitReturn

      static void emitReturn(AsmBuilder builder, SkinnyMethodAdapter mv, Class returnType, Class nativeIntType)
    • getfield

      static void getfield(SkinnyMethodAdapter mv, AsmBuilder builder, AsmBuilder.ObjectField field)
    • tryfinally

      static void tryfinally(SkinnyMethodAdapter mv, Runnable codeBlock, Runnable finallyBlock)
    • emitToNativeConversion

      static void emitToNativeConversion(AsmBuilder builder, SkinnyMethodAdapter mv, ToNativeType toNativeType)
    • emitFromNativeConversion

      static void emitFromNativeConversion(AsmBuilder builder, SkinnyMethodAdapter mv, FromNativeType fromNativeType, Class nativeClass)
    • getToNativeMethod

      static Method getToNativeMethod(ToNativeType toNativeType, AsmClassLoader classLoader)
    • getFromNativeMethod

      static Method getFromNativeMethod(FromNativeType fromNativeType, AsmClassLoader classLoader)
    • methodIsAccessible

      static boolean methodIsAccessible(Method method)
    • classIsVisible

      private static boolean classIsVisible(ClassLoader classLoader, Class klass)