Top Inners Fields Methods
jnr.ffi.mapper

public Interface FunctionMapper

Known Direct Implementers
jnr.ffi.mapper.SimpleFunctionMapper, jnr.ffi.provider.IdentityFunctionMapper, jnr.ffi.mapper.CompositeFunctionMapper
Imports
jnr.ffi.Library, java.lang.annotation.Annotation, java.util.Collection, .Collections, .HashMap, .Map

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static interface

Field Summary

Modifier and TypeField and Description
public static final FunctionMapper
IDENTITY

An implementation of jnr.ffi.mapper.FunctionMapper that maps 1:1 between java symbols and native functions

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

native equivalent or functionName if not in map
mapFunctionName
(String
to translate
functionName
,
FunctionMapper.Context
for translation
context
)

Translate the (Java) function name into its (native) equivalent.

Field Detail

IDENTITYback to summary
public static final FunctionMapper IDENTITY

An implementation of jnr.ffi.mapper.FunctionMapper that maps 1:1 between java symbols and native functions

Method Detail

mapFunctionNameback to summary
public String mapFunctionName(String functionName, FunctionMapper.Context context)

Translate the (Java) function name into its (native) equivalent. If the name is not present in the map, it is to return the supplied name (same object exactly).

Parameters
functionName:String

to translate

context:FunctionMapper.Context

for translation

Returns:String

native equivalent or functionName if not in map

jnr.ffi.mapper back to summary

public final Class FunctionMapper.Builder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Map<String, String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public FunctionMapper
public FunctionMapper.Builder
map(String javaName, String nativeFunction)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

functionNameMapback to summary
private final Map<String, String> functionNameMap

Constructor Detail

Builderback to summary
public Builder()

Method Detail

buildback to summary
public FunctionMapper build()
mapback to summary
public FunctionMapper.Builder map(String javaName, String nativeFunction)
jnr.ffi.mapper back to summary

public Interface FunctionMapper.Context

Known Direct Implementers
jnr.ffi.provider.jffi.NativeFunctionMapperContext

Method Summary

Modifier and TypeMethod and Description
public Collection<Annotation>
public Library
getLibrary()

Deprecated
public boolean

Method Detail

getAnnotationsback to summary
public Collection<Annotation> getAnnotations()
getLibraryback to summary
public Library getLibrary()

Deprecated

Annotations
@Deprecated
isSymbolPresentback to summary
public boolean isSymbolPresent(String name)