Package jnr.ffi.mapper
Interface FunctionMapper
-
- All Known Implementing Classes:
CompositeFunctionMapper
,IdentityFunctionMapper
public interface FunctionMapper
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
FunctionMapper.Builder
static interface
FunctionMapper.Context
-
Field Summary
Fields Modifier and Type Field Description static FunctionMapper
IDENTITY
An implementation ofFunctionMapper
that maps 1:1 between java symbols and native functions
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
mapFunctionName(java.lang.String functionName, FunctionMapper.Context context)
Translate the (Java) function name into its (native) equivalent.
-
-
-
Field Detail
-
IDENTITY
static final FunctionMapper IDENTITY
An implementation ofFunctionMapper
that maps 1:1 between java symbols and native functions
-
-
Method Detail
-
mapFunctionName
java.lang.String mapFunctionName(java.lang.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
- to translatecontext
- for translation- Returns:
- native equivalent or
functionName
if not in map
-
-