Top Inners Fields Constructors Methods
jnr.ffi.provider.jffi

pack-priv final Class NativeClosureManager

extends Object
implements ClosureManager
Class Inheritance
All Implemented Interfaces
jnr.ffi.provider.ClosureManager
Imports
jnr.ffi.Pointer, jnr.ffi.mapper.CachingTypeMapper, .CompositeTypeMapper, .SignatureTypeMapper, .ToNativeContext, .ToNativeConverter, jnr.ffi.provider.ClosureManager, java.util.IdentityHashMap, .Map

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private volatile Map<ClassLoader, AsmClassLoader>
private volatile Map<Class<?>, NativeClosureFactory<T>>
private final Runtime
private final SignatureTypeMapper

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv <T> NativeClosureFactory<T>
getClosureFactory(Class<T> closureClass)

public final <T> Pointer
getClosurePointer(Class<? extends T> closureClass, T instance)

Implements jnr.ffi.provider.ClosureManager.getClosurePointer.

pack-priv synchronized <T> NativeClosureFactory<T>
initClosureFactory(Class<T> closureClass, AsmClassLoader classLoader)

public <T> T
newClosure(Class<? extends T> closureClass, T instance)

Implements jnr.ffi.provider.ClosureManager.newClosure.

pack-priv <T> ToNativeConverter<T, Pointer>
newClosureSite(Class<T> closureClass)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

asmClassLoadersback to summary
private volatile Map<ClassLoader, AsmClassLoader> asmClassLoaders
factoriesback to summary
private volatile Map<Class<?>, NativeClosureFactory<T>> factories
runtimeback to summary
private final Runtime runtime
typeMapperback to summary
private final SignatureTypeMapper typeMapper

Constructor Detail

NativeClosureManagerback to summary
pack-priv NativeClosureManager(Runtime runtime, SignatureTypeMapper typeMapper)

Method Detail

getClosureFactoryback to summary
pack-priv <T> NativeClosureFactory<T> getClosureFactory(Class<T> closureClass)
getClosurePointerback to summary
public final <T> Pointer getClosurePointer(Class<? extends T> closureClass, T instance)

Implements jnr.ffi.provider.ClosureManager.getClosurePointer.

initClosureFactoryback to summary
pack-priv synchronized <T> NativeClosureFactory<T> initClosureFactory(Class<T> closureClass, AsmClassLoader classLoader)
newClosureback to summary
public <T> T newClosure(Class<? extends T> closureClass, T instance)

Implements jnr.ffi.provider.ClosureManager.newClosure.

newClosureSiteback to summary
pack-priv <T> ToNativeConverter<T, Pointer> newClosureSite(Class<T> closureClass)
jnr.ffi.provider.jffi back to summary

public final Class NativeClosureManager.ClosureSite<T>

extends Object
implements ToNativeConverter<T, Pointer>
Class Inheritance
All Implemented Interfaces
jnr.ffi.mapper.ToNativeConverter
Annotations
@NoContext

Field Summary

Modifier and TypeField and Description
private NativeClosureFactory.ClosureReference
private final NativeClosureFactory<T>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Class<Pointer>
public Pointer
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

closureReferenceback to summary
private NativeClosureFactory.ClosureReference closureReference
factoryback to summary
private final NativeClosureFactory<T> factory

Constructor Detail

ClosureSiteback to summary
private ClosureSite(NativeClosureFactory<T> factory)

Method Detail

nativeTypeback to summary
public Class<Pointer> nativeType()

Implements jnr.ffi.mapper.ToNativeConverter.nativeType.

toNativeback to summary
public Pointer toNative(T value, ToNativeContext context)

Implements jnr.ffi.mapper.ToNativeConverter.toNative.