Package jnr.ffi.provider.jffi
Class AbstractFastNumericMethodGenerator
- java.lang.Object
-
- jnr.ffi.provider.jffi.BaseMethodGenerator
-
- jnr.ffi.provider.jffi.AbstractFastNumericMethodGenerator
-
- All Implemented Interfaces:
MethodGenerator
- Direct Known Subclasses:
FastIntMethodGenerator
,FastLongMethodGenerator
,FastNumericMethodGenerator
abstract class AbstractFastNumericMethodGenerator extends BaseMethodGenerator
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.util.Map<java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy>,java.lang.reflect.Method>
STRATEGY_ADDRESS_METHODS
(package private) static java.util.Map<java.lang.Class,java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy>>
STRATEGY_PARAMETER_TYPES
-
Constructor Summary
Constructors Constructor Description AbstractFastNumericMethodGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private static void
addStrategyParameterType(java.util.Map<java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy>,java.lang.reflect.Method> map, java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy> strategyClass, java.lang.Class parameterType)
(package private) static int
emitDirectCheck(SkinnyMethodAdapter mv, java.lang.Class javaParameterClass, java.lang.Class nativeIntType, LocalVariable parameter, LocalVariable objCount, int pointerCount)
(package private) static void
emitParameterStrategyAddress(SkinnyMethodAdapter mv, java.lang.Class nativeIntType, java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy> strategyClass, LocalVariable strategy, LocalVariable parameter)
(package private) static java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy>
emitParameterStrategyLookup(SkinnyMethodAdapter mv, java.lang.Class javaParameterType)
void
generate(AsmBuilder builder, SkinnyMethodAdapter mv, LocalVariableAllocator localVariableAllocator, com.kenai.jffi.CallContext callContext, ResultType resultType, ParameterType[] parameterTypes, boolean ignoreError)
(package private) abstract java.lang.String
getInvokerMethodName(ResultType resultType, ParameterType[] parameterTypes, boolean ignoreErrno)
(package private) abstract java.lang.String
getInvokerSignature(int parameterCount, java.lang.Class nativeIntType)
(package private) abstract java.lang.Class
getInvokerType()
(package private) static java.lang.String
getObjectParameterMethodName(int parameterCount)
(package private) static java.lang.String
getObjectParameterMethodSignature(int parameterCount, int pointerCount)
(package private) static boolean
hasPointerParameterStrategy(java.lang.Class javaType)
-
Methods inherited from class jnr.ffi.provider.jffi.BaseMethodGenerator
emitEpilogue, emitPostInvoke, generate, isPostInvokeRequired, loadAndConvertParameter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jnr.ffi.provider.jffi.MethodGenerator
isSupported
-
-
-
-
Field Detail
-
STRATEGY_ADDRESS_METHODS
static final java.util.Map<java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy>,java.lang.reflect.Method> STRATEGY_ADDRESS_METHODS
-
STRATEGY_PARAMETER_TYPES
static final java.util.Map<java.lang.Class,java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy>> STRATEGY_PARAMETER_TYPES
-
-
Method Detail
-
generate
public void generate(AsmBuilder builder, SkinnyMethodAdapter mv, LocalVariableAllocator localVariableAllocator, com.kenai.jffi.CallContext callContext, ResultType resultType, ParameterType[] parameterTypes, boolean ignoreError)
- Specified by:
generate
in classBaseMethodGenerator
-
addStrategyParameterType
private static void addStrategyParameterType(java.util.Map<java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy>,java.lang.reflect.Method> map, java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy> strategyClass, java.lang.Class parameterType)
-
hasPointerParameterStrategy
static boolean hasPointerParameterStrategy(java.lang.Class javaType)
-
emitParameterStrategyLookup
static java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy> emitParameterStrategyLookup(SkinnyMethodAdapter mv, java.lang.Class javaParameterType)
-
emitParameterStrategyAddress
static void emitParameterStrategyAddress(SkinnyMethodAdapter mv, java.lang.Class nativeIntType, java.lang.Class<? extends com.kenai.jffi.ObjectParameterStrategy> strategyClass, LocalVariable strategy, LocalVariable parameter)
-
emitDirectCheck
static int emitDirectCheck(SkinnyMethodAdapter mv, java.lang.Class javaParameterClass, java.lang.Class nativeIntType, LocalVariable parameter, LocalVariable objCount, int pointerCount)
-
getObjectParameterMethodName
static java.lang.String getObjectParameterMethodName(int parameterCount)
-
getObjectParameterMethodSignature
static java.lang.String getObjectParameterMethodSignature(int parameterCount, int pointerCount)
-
getInvokerMethodName
abstract java.lang.String getInvokerMethodName(ResultType resultType, ParameterType[] parameterTypes, boolean ignoreErrno)
-
getInvokerSignature
abstract java.lang.String getInvokerSignature(int parameterCount, java.lang.Class nativeIntType)
-
getInvokerType
abstract java.lang.Class getInvokerType()
-
-