Package jnr.ffi.provider.jffi
Class AsmUtil
java.lang.Object
jnr.ffi.provider.jffi.AsmUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Class
(package private) static void
boxValue
(AsmBuilder builder, SkinnyMethodAdapter mv, Class boxedType, Class unboxedType) (package private) static int
Calculates the size of a local variable(package private) static int
calculateLocalVariableSpace
(Class... types) Calculates the size of a list of types in the local variable area.(package private) static int
Calculates the size of a local variable(package private) static int
calculateLocalVariableSpace
(SigType... types) Calculates the size of a list of types in the local variable area.private static boolean
classIsVisible
(ClassLoader classLoader, Class klass) (package private) static void
emitFromNativeConversion
(AsmBuilder builder, SkinnyMethodAdapter mv, FromNativeType fromNativeType, Class nativeClass) (package private) static void
emitReturn
(AsmBuilder builder, SkinnyMethodAdapter mv, Class returnType, Class nativeIntType) (package private) static void
emitReturnOp
(SkinnyMethodAdapter mv, Class returnType) (package private) static void
emitToNativeConversion
(AsmBuilder builder, SkinnyMethodAdapter mv, ToNativeType toNativeType) (package private) static void
getfield
(SkinnyMethodAdapter mv, AsmBuilder builder, AsmBuilder.ObjectField field) (package private) static Method
getFromNativeMethod
(FromNativeType fromNativeType, AsmClassLoader classLoader) (package private) static int
getNativeArrayFlags
(int flags) (package private) static int
getNativeArrayFlags
(Collection<Annotation> annotations) (package private) static LocalVariable[]
getParameterVariables
(Class[] parameterTypes) (package private) static LocalVariable[]
getParameterVariables
(ParameterType[] parameterTypes) (package private) static Method
getToNativeMethod
(ToNativeType toNativeType, AsmClassLoader classLoader) (package private) static void
load
(SkinnyMethodAdapter mv, Class parameterType, LocalVariable parameter) (package private) static boolean
methodIsAccessible
(Method method) static org.objectweb.asm.ClassVisitor
newCheckClassAdapter
(org.objectweb.asm.ClassVisitor cv) static org.objectweb.asm.ClassVisitor
static org.objectweb.asm.ClassVisitor
newTraceClassVisitor
(org.objectweb.asm.ClassVisitor cv, OutputStream out) static org.objectweb.asm.ClassVisitor
newTraceClassVisitor
(org.objectweb.asm.ClassVisitor cv, PrintWriter out) static org.objectweb.asm.MethodVisitor
newTraceMethodVisitor
(org.objectweb.asm.MethodVisitor mv) (package private) static void
store
(SkinnyMethodAdapter mv, Class type, LocalVariable var) (package private) static void
tryfinally
(SkinnyMethodAdapter mv, Runnable codeBlock, Runnable finallyBlock) (package private) static void
unboxBoolean
(SkinnyMethodAdapter mv, Class nativeType) (package private) static void
unboxBoolean
(SkinnyMethodAdapter mv, Class boxedType, Class nativeType) static Class
unboxedReturnType
(Class type) static Class
unboxedType
(Class boxedType) (package private) static void
unboxNumber
(SkinnyMethodAdapter mv, Class boxedType, Class nativeType) (package private) static void
unboxNumber
(SkinnyMethodAdapter mv, Class boxedType, Class unboxedType, NativeType nativeType) (package private) static void
unboxPointer
(SkinnyMethodAdapter mv, Class nativeType) private static void
unboxPointerOrStruct
(SkinnyMethodAdapter mv, Class type, Class nativeType)
-
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
-
newCheckClassAdapter
public static org.objectweb.asm.ClassVisitor newCheckClassAdapter(org.objectweb.asm.ClassVisitor cv) -
unboxedReturnType
-
unboxedType
-
boxedType
-
emitReturnOp
-
calculateLocalVariableSpace
Calculates the size of a local variable- Parameters:
type
- The type of parameter- Returns:
- The size in parameter units
-
calculateLocalVariableSpace
Calculates the size of a local variable- Parameters:
type
- The type of parameter- Returns:
- The size in parameter units
-
calculateLocalVariableSpace
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
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
-
unboxPointer
-
unboxBoolean
-
unboxBoolean
-
unboxNumber
static void unboxNumber(SkinnyMethodAdapter mv, Class boxedType, Class unboxedType, NativeType nativeType) -
unboxNumber
-
boxValue
static void boxValue(AsmBuilder builder, SkinnyMethodAdapter mv, Class boxedType, Class unboxedType) -
getNativeArrayFlags
static int getNativeArrayFlags(int flags) -
getNativeArrayFlags
-
getParameterVariables
-
getParameterVariables
-
load
-
store
-
emitReturn
static void emitReturn(AsmBuilder builder, SkinnyMethodAdapter mv, Class returnType, Class nativeIntType) -
getfield
-
tryfinally
-
emitToNativeConversion
static void emitToNativeConversion(AsmBuilder builder, SkinnyMethodAdapter mv, ToNativeType toNativeType) -
emitFromNativeConversion
static void emitFromNativeConversion(AsmBuilder builder, SkinnyMethodAdapter mv, FromNativeType fromNativeType, Class nativeClass) -
getToNativeMethod
-
getFromNativeMethod
-
methodIsAccessible
-
classIsVisible
-