Top Description Inners Fields Constructors Methods
jnr.ffi.mapper

public final Class CachingTypeMapper

extends AbstractSignatureTypeMapper
implements SignatureTypeMapper
Class Inheritance
All Implemented Interfaces
jnr.ffi.mapper.SignatureTypeMapper
Imports
java.util.Collections, .HashMap, .Map

Caches native converter lookups by class.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private volatile Map<SignatureType, FromNativeType>
private final SignatureTypeMapper
private static final CachingTypeMapper.InvalidType
private volatile Map<SignatureType, ToNativeType>
private static final CachingTypeMapper.InvalidType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public FromNativeType
public ToNativeType
private synchronized FromNativeType
private synchronized ToNativeType

Field Detail

fromNativeTypeMapback to summary
private volatile Map<SignatureType, FromNativeType> fromNativeTypeMap
mapperback to summary
private final SignatureTypeMapper mapper
NO_TYPEback to summary
private static final CachingTypeMapper.InvalidType NO_TYPE
toNativeTypeMapback to summary
private volatile Map<SignatureType, ToNativeType> toNativeTypeMap
UNCACHEABLE_TYPEback to summary
private static final CachingTypeMapper.InvalidType UNCACHEABLE_TYPE

Constructor Detail

CachingTypeMapperback to summary
public CachingTypeMapper(SignatureTypeMapper mapper)

Method Detail

getFromNativeTypeback to summary
public FromNativeType getFromNativeType(SignatureType type, FromNativeContext context)

Overrides jnr.ffi.mapper.AbstractSignatureTypeMapper.getFromNativeType.

Implements jnr.ffi.mapper.SignatureTypeMapper.getFromNativeType.

Annotations
@Override
getToNativeTypeback to summary
public ToNativeType getToNativeType(SignatureType type, ToNativeContext context)

Overrides jnr.ffi.mapper.AbstractSignatureTypeMapper.getToNativeType.

Implements jnr.ffi.mapper.SignatureTypeMapper.getToNativeType.

Annotations
@Override
lookupAndCacheFromNativeTypeback to summary
private synchronized FromNativeType lookupAndCacheFromNativeType(SignatureType signature, FromNativeContext context)
lookupAndCacheToNativeTypeback to summary
private synchronized ToNativeType lookupAndCacheToNativeType(SignatureType signature, ToNativeContext context)
jnr.ffi.mapper back to summary

private final Class CachingTypeMapper.InvalidType

extends Object
implements ToNativeType, FromNativeType
Class Inheritance
All Implemented Interfaces
jnr.ffi.mapper.FromNativeType, jnr.ffi.mapper.ToNativeType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public FromNativeConverter<J, N>
public ToNativeConverter<J, N>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

InvalidTypeback to summary
private InvalidType()

Method Detail

getFromNativeConverterback to summary
public FromNativeConverter<J, N> getFromNativeConverter()

Implements jnr.ffi.mapper.FromNativeType.getFromNativeConverter.

Annotations
@Override
getToNativeConverterback to summary
public ToNativeConverter<J, N> getToNativeConverter()

Implements jnr.ffi.mapper.ToNativeType.getToNativeConverter.

Annotations
@Override