org.bridj
Class MethodCallInfo

java.lang.Object
  extended by org.bridj.MethodCallInfo

public class MethodCallInfo
extends Object

Internal class that encapsulate all the knowledge about a native method call : signatures (ASM, dyncall and Java), calling convention, context...

Author:
Olivier

Constructor Summary
MethodCallInfo(Method method)
           
MethodCallInfo(Method method, Method definition)
           
MethodCallInfo(Type genericReturnType, Annotation[] returnAnnotations, Type[] parameterTypes, Annotation[][] paramsAnnotations, boolean prependJNIPointers)
           
MethodCallInfo(Type genericReturnType, Type[] parameterTypes, boolean prependJNIPointers)
           
 
Method Summary
 void appendToSignature(int iParam, org.bridj.NativeConstants.ValueType type, Class<?> parameterType, Type genericParameterType, StringBuilder javaSig, StringBuilder dcSig, StringBuilder asmSig)
           
 String getASMSignature()
           
 org.bridj.CallIO[] getCallIOs()
           
 int getDcCallingConvention()
           
 String getDcSignature()
           
 Class<?> getDeclaringClass()
           
 long getForwardedPointer()
           
 Object getJavaCallback()
           
 String getJavaSignature()
           
 Method getMethod()
           
 String getSymbolName()
           
 org.bridj.NativeConstants.ValueType getValueType(int iParam, int nParams, Class<?> c, Type t, AnnotatedElement element, Annotation... directAnnotations)
           
 int getVirtualIndex()
           
 boolean hasCallingConvention()
           
protected  void init(AnnotatedElement annotatedElement, Class returnType, Type genericReturnType, Annotation[] returnAnnotations, Class[] parameterTypes, Type[] genericParameterTypes, Annotation[][] paramsAnnotations, boolean prependJNIPointers, boolean isVirtual, boolean isDirectModeAllowed)
           
 boolean isGenericCallback()
           
 void prependCallbackCC()
           
 void setCallingConvention(Convention.Style style)
           
 void setDcCallingConvention(int dcCallingConvention)
           
 void setDeclaringClass(Class<?> declaringClass)
           
 void setForwardedPointer(long forwardedPointer)
           
 void setGenericCallback(boolean genericCallback)
           
 void setJavaCallback(Object javaCallback)
           
 void setJavaSignature(String javaSignature)
           
 void setMethod(Method method)
           
 void setNativeClass(long nativeClass)
           
 void setSymbolName(String symbolName)
           
 void setVirtualIndex(int virtualIndex)
          Used for C++ virtual indexes and for struct fields ids
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodCallInfo

public MethodCallInfo(Method method)

MethodCallInfo

public MethodCallInfo(Type genericReturnType,
                      Type[] parameterTypes,
                      boolean prependJNIPointers)

MethodCallInfo

public MethodCallInfo(Type genericReturnType,
                      Annotation[] returnAnnotations,
                      Type[] parameterTypes,
                      Annotation[][] paramsAnnotations,
                      boolean prependJNIPointers)

MethodCallInfo

public MethodCallInfo(Method method,
                      Method definition)
Method Detail

init

protected void init(AnnotatedElement annotatedElement,
                    Class returnType,
                    Type genericReturnType,
                    Annotation[] returnAnnotations,
                    Class[] parameterTypes,
                    Type[] genericParameterTypes,
                    Annotation[][] paramsAnnotations,
                    boolean prependJNIPointers,
                    boolean isVirtual,
                    boolean isDirectModeAllowed)

hasCallingConvention

public boolean hasCallingConvention()

setCallingConvention

public void setCallingConvention(Convention.Style style)

getCallIOs

public org.bridj.CallIO[] getCallIOs()

prependCallbackCC

public void prependCallbackCC()

getDcSignature

public String getDcSignature()

getJavaSignature

public String getJavaSignature()

getASMSignature

public String getASMSignature()

getValueType

public org.bridj.NativeConstants.ValueType getValueType(int iParam,
                                                        int nParams,
                                                        Class<?> c,
                                                        Type t,
                                                        AnnotatedElement element,
                                                        Annotation... directAnnotations)

appendToSignature

public void appendToSignature(int iParam,
                              org.bridj.NativeConstants.ValueType type,
                              Class<?> parameterType,
                              Type genericParameterType,
                              StringBuilder javaSig,
                              StringBuilder dcSig,
                              StringBuilder asmSig)

setMethod

public void setMethod(Method method)

setJavaSignature

public void setJavaSignature(String javaSignature)

getMethod

public Method getMethod()

setDeclaringClass

public void setDeclaringClass(Class<?> declaringClass)

getDeclaringClass

public Class<?> getDeclaringClass()

setForwardedPointer

public void setForwardedPointer(long forwardedPointer)

getForwardedPointer

public long getForwardedPointer()

setVirtualIndex

public void setVirtualIndex(int virtualIndex)
Used for C++ virtual indexes and for struct fields ids

Parameters:
virtualIndex -

getVirtualIndex

public int getVirtualIndex()

getSymbolName

public String getSymbolName()

setSymbolName

public void setSymbolName(String symbolName)

setDcCallingConvention

public void setDcCallingConvention(int dcCallingConvention)

getDcCallingConvention

public int getDcCallingConvention()

getJavaCallback

public Object getJavaCallback()

setJavaCallback

public void setJavaCallback(Object javaCallback)

setGenericCallback

public void setGenericCallback(boolean genericCallback)

isGenericCallback

public boolean isGenericCallback()

setNativeClass

public void setNativeClass(long nativeClass)


Copyright © 2009-2012. All Rights Reserved.