Package jnr.ffi.provider.jffi
Class VariableAccessorGenerator
- java.lang.Object
-
- jnr.ffi.provider.jffi.VariableAccessorGenerator
-
public class VariableAccessorGenerator extends java.lang.Object
Generate global variable accessors
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
VariableAccessorGenerator.PointerOp
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicLong
nextClassID
private static VariableAccessorGenerator.PointerOp
POINTER_OP_POINTER
(package private) static java.util.Map<NativeType,VariableAccessorGenerator.PointerOp>
pointerOperations
private Runtime
runtime
-
Constructor Summary
Constructors Constructor Description VariableAccessorGenerator(Runtime runtime)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) Variable
buildVariableAccessor(Runtime runtime, long address, java.lang.Class interfaceClass, java.lang.Class javaType, java.util.Collection<java.lang.annotation.Annotation> annotations, ToNativeConverter toNativeConverter, FromNativeConverter fromNativeConverter, AsmClassLoader classLoader)
void
generate(AsmBuilder builder, java.lang.Class interfaceClass, java.lang.String variableName, long address, java.lang.Class javaType, java.util.Collection<java.lang.annotation.Annotation> annotations, SignatureTypeMapper typeMapper, AsmClassLoader classLoader)
private static void
op(java.util.Map<NativeType,VariableAccessorGenerator.PointerOp> ops, NativeType type, java.lang.String name, java.lang.Class nativeIntType)
-
-
-
Field Detail
-
nextClassID
private final java.util.concurrent.atomic.AtomicLong nextClassID
-
runtime
private final Runtime runtime
-
pointerOperations
static final java.util.Map<NativeType,VariableAccessorGenerator.PointerOp> pointerOperations
-
POINTER_OP_POINTER
private static final VariableAccessorGenerator.PointerOp POINTER_OP_POINTER
-
-
Constructor Detail
-
VariableAccessorGenerator
public VariableAccessorGenerator(Runtime runtime)
-
-
Method Detail
-
generate
public void generate(AsmBuilder builder, java.lang.Class interfaceClass, java.lang.String variableName, long address, java.lang.Class javaType, java.util.Collection<java.lang.annotation.Annotation> annotations, SignatureTypeMapper typeMapper, AsmClassLoader classLoader)
-
buildVariableAccessor
Variable buildVariableAccessor(Runtime runtime, long address, java.lang.Class interfaceClass, java.lang.Class javaType, java.util.Collection<java.lang.annotation.Annotation> annotations, ToNativeConverter toNativeConverter, FromNativeConverter fromNativeConverter, AsmClassLoader classLoader)
-
op
private static void op(java.util.Map<NativeType,VariableAccessorGenerator.PointerOp> ops, NativeType type, java.lang.String name, java.lang.Class nativeIntType)
-
-