Class Generator

    • Constructor Summary

      Constructors 
      Constructor Description
      Generator​(Logger logger, java.util.Properties properties)  
      Generator​(Logger logger, java.util.Properties properties, java.lang.String encoding)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) AdapterInformation adapterInformation​(boolean out, java.lang.String valueTypeName, java.lang.annotation.Annotation... annotations)  
      (package private) AdapterInformation adapterInformation​(boolean out, MethodInformation methodInfo, int j)  
      (package private) static Allocator allocator​(java.lang.Class<?> cls, java.lang.reflect.Method method)  
      (package private) static int allocatorMax​(java.lang.Class<?> cls, java.lang.reflect.Method method)  
      (package private) static boolean asUtf16​(java.lang.annotation.Annotation[] annotations)  
      (package private) static boolean asUtf16​(MethodInformation methodInfo, int j)  
      (package private) java.lang.annotation.Annotation behavior​(java.lang.annotation.Annotation... annotations)  
      (package private) java.lang.annotation.Annotation by​(java.lang.annotation.Annotation... annotations)  
      (package private) java.lang.annotation.Annotation by​(MethodInformation methodInfo, int j)  
      (package private) void call​(MethodInformation methodInfo, java.lang.String returnPrefix, boolean secondCall)  
      (package private) void callback​(java.lang.Class<?> cls, java.lang.reflect.Method callbackMethod, java.lang.String callbackName, int allocatorMax, boolean needDefinition, MethodInformation methodInfo)  
      (package private) void callbackAllocator​(java.lang.Class<?> cls, java.lang.String callbackName, int allocatorMax)  
      (package private) java.lang.String cast​(java.lang.Class<?> type, java.lang.annotation.Annotation... annotations)  
      (package private) java.lang.String cast​(MethodInformation methodInfo, int j)  
      (package private) boolean classes​(boolean handleExceptions, boolean defineAdapters, boolean convertStrings, boolean declareEnums, java.lang.String loadSuffix, java.lang.String baseLoadSuffix, java.lang.String classPath, java.lang.Class<?>... classes)  
      (package private) static boolean constFunction​(java.lang.Class<?> classType, java.lang.reflect.Method functionMethod)  
      (package private) static java.lang.String constValueTypeName​(java.lang.String... typeName)  
      (package private) java.lang.String[] cppAnnotationTypeName​(java.lang.Class<?> type, java.lang.annotation.Annotation... annotations)  
      (package private) java.lang.String[] cppCastTypeName​(java.lang.Class<?> type, java.lang.annotation.Annotation... annotations)  
      (package private) java.lang.String[] cppFunctionTypeName​(java.lang.reflect.Method... functionMethods)  
      (package private) static java.lang.String cppScopeName​(java.lang.Class<?> type)  
      (package private) static java.lang.String cppScopeName​(MethodInformation methodInfo)  
      (package private) java.lang.String[] cppTypeName​(java.lang.Class<?> type)  
      (package private) java.lang.String[] cppTypeName​(java.lang.Class<?> type, java.lang.annotation.Annotation[] annotations)  
      (package private) java.lang.String[] cppTypeName​(MethodInformation methodInfo, int j)  
      (package private) static java.lang.String createString​(java.lang.String ptr, java.lang.String adapter, boolean asUtf16)  
      (package private) static boolean criticalRegion​(java.lang.Class<?> cls, java.lang.reflect.Method method)  
      (package private) java.lang.String enumValueType​(java.lang.Class<?> type)  
      (package private) static java.lang.String functionClassName​(java.lang.Class<?> cls)  
      (package private) static java.lang.reflect.Method[] functionMethods​(java.lang.Class<?> cls, boolean[] callbackAllocators)  
      boolean generate​(java.lang.String sourceFilename, java.lang.String jniConfigFilename, java.lang.String reflectConfigFilename, java.lang.String headerFilename, java.lang.String loadSuffix, java.lang.String baseLoadSuffix, java.lang.String classPath, java.lang.Class<?>... classes)  
      (package private) static java.lang.String getStringData​(java.lang.String str, boolean asUtf16)  
      (package private) static java.lang.String jniTypeName​(java.lang.Class type)  
      (package private) static java.lang.String mangle​(java.lang.String name)  
      (package private) MethodInformation methodInformation​(java.lang.reflect.Method method)  
      (package private) boolean methods​(java.lang.Class<?> cls)  
      (package private) static boolean noexceptFunction​(java.lang.Class<?> classType, java.lang.reflect.Method functionMethod)  
      (package private) static boolean noException​(java.lang.Class<?> cls, java.lang.reflect.Method method)  
      (package private) void parametersAfter​(MethodInformation methodInfo)  
      (package private) void parametersBefore​(MethodInformation methodInfo)  
      (package private) static java.lang.String releaseStringData​(java.lang.String str, java.lang.String ptr, boolean asUtf16)  
      (package private) void returnAfter​(MethodInformation methodInfo)  
      (package private) java.lang.String returnBefore​(MethodInformation methodInfo)  
      (package private) static java.lang.String signature​(java.lang.Class... types)  
      (package private) static java.lang.String valueTypeName​(java.lang.String... typeName)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • baseClasses

        static final java.util.List<java.lang.Class> baseClasses
      • properties

        final java.util.Properties properties
      • encoding

        final java.lang.String encoding
      • out

        java.io.PrintWriter out
      • out2

        java.io.PrintWriter out2
      • jniConfigOut

        java.io.PrintWriter jniConfigOut
      • reflectConfigOut

        java.io.PrintWriter reflectConfigOut
      • callbacks

        java.util.Map<java.lang.String,​java.lang.String> callbacks
      • deallocators

        IndexedSet<java.lang.Class> deallocators
      • arrayDeallocators

        IndexedSet<java.lang.Class> arrayDeallocators
      • members

        java.util.Map<java.lang.Class,​java.util.Set<java.lang.String>> members
      • virtualFunctions

        java.util.Map<java.lang.Class,​java.util.Set<java.lang.String>> virtualFunctions
      • virtualMembers

        java.util.Map<java.lang.Class,​java.util.Set<java.lang.String>> virtualMembers
      • annotationCache

        java.util.Map<java.lang.reflect.Method,​MethodInformation> annotationCache
      • mayThrowExceptions

        boolean mayThrowExceptions
      • usesAdapters

        boolean usesAdapters
      • passesStrings

        boolean passesStrings
      • accessesEnums

        boolean accessesEnums
    • Constructor Detail

      • Generator

        public Generator​(Logger logger,
                         java.util.Properties properties)
      • Generator

        public Generator​(Logger logger,
                         java.util.Properties properties,
                         java.lang.String encoding)
    • Method Detail

      • generate

        public boolean generate​(java.lang.String sourceFilename,
                                java.lang.String jniConfigFilename,
                                java.lang.String reflectConfigFilename,
                                java.lang.String headerFilename,
                                java.lang.String loadSuffix,
                                java.lang.String baseLoadSuffix,
                                java.lang.String classPath,
                                java.lang.Class<?>... classes)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • classes

        boolean classes​(boolean handleExceptions,
                        boolean defineAdapters,
                        boolean convertStrings,
                        boolean declareEnums,
                        java.lang.String loadSuffix,
                        java.lang.String baseLoadSuffix,
                        java.lang.String classPath,
                        java.lang.Class<?>... classes)
      • methods

        boolean methods​(java.lang.Class<?> cls)
      • call

        void call​(MethodInformation methodInfo,
                  java.lang.String returnPrefix,
                  boolean secondCall)
      • callback

        void callback​(java.lang.Class<?> cls,
                      java.lang.reflect.Method callbackMethod,
                      java.lang.String callbackName,
                      int allocatorMax,
                      boolean needDefinition,
                      MethodInformation methodInfo)
      • callbackAllocator

        void callbackAllocator​(java.lang.Class<?> cls,
                               java.lang.String callbackName,
                               int allocatorMax)
      • functionClassName

        static java.lang.String functionClassName​(java.lang.Class<?> cls)
      • functionMethods

        static java.lang.reflect.Method[] functionMethods​(java.lang.Class<?> cls,
                                                          boolean[] callbackAllocators)
      • methodInformation

        MethodInformation methodInformation​(java.lang.reflect.Method method)
      • allocatorMax

        static int allocatorMax​(java.lang.Class<?> cls,
                                java.lang.reflect.Method method)
      • allocator

        static Allocator allocator​(java.lang.Class<?> cls,
                                   java.lang.reflect.Method method)
      • criticalRegion

        static boolean criticalRegion​(java.lang.Class<?> cls,
                                      java.lang.reflect.Method method)
      • noException

        static boolean noException​(java.lang.Class<?> cls,
                                   java.lang.reflect.Method method)
      • adapterInformation

        AdapterInformation adapterInformation​(boolean out,
                                              java.lang.String valueTypeName,
                                              java.lang.annotation.Annotation... annotations)
      • cast

        java.lang.String cast​(java.lang.Class<?> type,
                              java.lang.annotation.Annotation... annotations)
      • by

        java.lang.annotation.Annotation by​(java.lang.annotation.Annotation... annotations)
      • behavior

        java.lang.annotation.Annotation behavior​(java.lang.annotation.Annotation... annotations)
      • enumValueType

        java.lang.String enumValueType​(java.lang.Class<?> type)
      • asUtf16

        static boolean asUtf16​(java.lang.annotation.Annotation[] annotations)
      • createString

        static java.lang.String createString​(java.lang.String ptr,
                                             java.lang.String adapter,
                                             boolean asUtf16)
      • getStringData

        static java.lang.String getStringData​(java.lang.String str,
                                              boolean asUtf16)
      • releaseStringData

        static java.lang.String releaseStringData​(java.lang.String str,
                                                  java.lang.String ptr,
                                                  boolean asUtf16)
      • constValueTypeName

        static java.lang.String constValueTypeName​(java.lang.String... typeName)
      • valueTypeName

        static java.lang.String valueTypeName​(java.lang.String... typeName)
      • constFunction

        static boolean constFunction​(java.lang.Class<?> classType,
                                     java.lang.reflect.Method functionMethod)
      • noexceptFunction

        static boolean noexceptFunction​(java.lang.Class<?> classType,
                                        java.lang.reflect.Method functionMethod)
      • cppAnnotationTypeName

        java.lang.String[] cppAnnotationTypeName​(java.lang.Class<?> type,
                                                 java.lang.annotation.Annotation... annotations)
      • cppCastTypeName

        java.lang.String[] cppCastTypeName​(java.lang.Class<?> type,
                                           java.lang.annotation.Annotation... annotations)
      • cppTypeName

        java.lang.String[] cppTypeName​(MethodInformation methodInfo,
                                       int j)
      • cppTypeName

        java.lang.String[] cppTypeName​(java.lang.Class<?> type)
      • cppTypeName

        java.lang.String[] cppTypeName​(java.lang.Class<?> type,
                                       java.lang.annotation.Annotation[] annotations)
      • cppFunctionTypeName

        java.lang.String[] cppFunctionTypeName​(java.lang.reflect.Method... functionMethods)
      • cppScopeName

        static java.lang.String cppScopeName​(MethodInformation methodInfo)
      • cppScopeName

        static java.lang.String cppScopeName​(java.lang.Class<?> type)
      • jniTypeName

        static java.lang.String jniTypeName​(java.lang.Class type)
      • signature

        static java.lang.String signature​(java.lang.Class... types)
      • mangle

        static java.lang.String mangle​(java.lang.String name)