Package jnr.ffi.mapper
Class MethodParameterContext
- java.lang.Object
-
- jnr.ffi.mapper.MethodParameterContext
-
- All Implemented Interfaces:
ToNativeContext
public final class MethodParameterContext extends java.lang.Object implements ToNativeContext
Holds context for a method parameter from Java to native conversion.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.annotation.Annotation[]annotationArrayprivate java.util.Collection<java.lang.annotation.Annotation>annotationsprivate java.lang.reflect.Methodmethodprivate intparameterIndexprivate Runtimeruntime
-
Constructor Summary
Constructors Constructor Description MethodParameterContext(Runtime runtime, java.lang.reflect.Method method, int parameterIndex)MethodParameterContext(Runtime runtime, java.lang.reflect.Method method, int parameterIndex, java.lang.annotation.Annotation[] annotationArray)MethodParameterContext(Runtime runtime, java.lang.reflect.Method method, int parameterIndex, java.util.Collection<java.lang.annotation.Annotation> annotations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.Collection<java.lang.annotation.Annotation>buildAnnotationCollection()booleanequals(java.lang.Object o)java.util.Collection<java.lang.annotation.Annotation>getAnnotations()Gets a sorted list of annotationsjava.lang.reflect.MethodgetMethod()intgetParameterIndex()RuntimegetRuntime()Gets theRuntimeused for the conversion.inthashCode()
-
-
-
Field Detail
-
runtime
private final Runtime runtime
-
method
private final java.lang.reflect.Method method
-
parameterIndex
private final int parameterIndex
-
annotations
private java.util.Collection<java.lang.annotation.Annotation> annotations
-
annotationArray
private java.lang.annotation.Annotation[] annotationArray
-
-
Constructor Detail
-
MethodParameterContext
public MethodParameterContext(Runtime runtime, java.lang.reflect.Method method, int parameterIndex)
-
MethodParameterContext
public MethodParameterContext(Runtime runtime, java.lang.reflect.Method method, int parameterIndex, java.lang.annotation.Annotation[] annotationArray)
-
MethodParameterContext
public MethodParameterContext(Runtime runtime, java.lang.reflect.Method method, int parameterIndex, java.util.Collection<java.lang.annotation.Annotation> annotations)
-
-
Method Detail
-
getMethod
public java.lang.reflect.Method getMethod()
-
getParameterIndex
public int getParameterIndex()
-
getAnnotations
public java.util.Collection<java.lang.annotation.Annotation> getAnnotations()
Description copied from interface:ToNativeContextGets a sorted list of annotations- Specified by:
getAnnotationsin interfaceToNativeContext- Returns:
- a sorted list of annotations for this native type
-
getRuntime
public Runtime getRuntime()
Description copied from interface:ToNativeContextGets theRuntimeused for the conversion.- Specified by:
getRuntimein interfaceToNativeContext- Returns:
- The runtime used for the conversion.
-
buildAnnotationCollection
private java.util.Collection<java.lang.annotation.Annotation> buildAnnotationCollection()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-