Top Inners Fields Constructors Methods
jnr.posix

public Class SimpleFunctionMapper

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

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

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
mapFunctionName(String
to translate
functionName
,
FunctionMapper.Context
for translation
context
)

Implements jnr.ffi.mapper.FunctionMapper.mapFunctionName.

Translate the (Java) function name into its (native) equivalent.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

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

Constructor Detail

SimpleFunctionMapperback to summary
private SimpleFunctionMapper(Map<String, String> map)

Method Detail

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

Implements jnr.ffi.mapper.FunctionMapper.mapFunctionName.

Doc from jnr.ffi.mapper.FunctionMapper.mapFunctionName.

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.posix back to summary

public Class SimpleFunctionMapper.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 SimpleFunctionMapper
public SimpleFunctionMapper.Builder
map(String posixName, 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 SimpleFunctionMapper build()
mapback to summary
public SimpleFunctionMapper.Builder map(String posixName, String nativeFunction)