Class Generator

java.lang.Object
net.binis.codegen.generation.core.Generator

public class Generator extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addGetter(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration type, com.github.javaparser.ast.body.ClassOrInterfaceDeclaration spec, com.github.javaparser.ast.body.MethodDeclaration declaration, boolean isClass, PrototypeField field)
     
    static void
    addMethod(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration spec, Method declaration, Map<String,String> signature)
     
    static void
    addSetter(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration type, com.github.javaparser.ast.body.ClassOrInterfaceDeclaration spec, com.github.javaparser.ast.body.MethodDeclaration declaration, boolean isClass, PrototypeField field)
     
    protected static String
    calcInterfacePackage(PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> prsd)
     
    static void
     
    static <T> T
    findInheritanceProperty(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration spec, PrototypeData properties, BiFunction<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration,PrototypeData,T> func)
     
    static void
    generateCodeForClass(com.github.javaparser.ast.CompilationUnit parser)
     
    static void
    generateCodeForClass(com.github.javaparser.ast.CompilationUnit parser, PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> prsd)
     
    static com.github.javaparser.ast.CompilationUnit
     
    static void
    generateCodeForElements(PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> prsd)
     
    static void
    generateCodeForEnum(com.github.javaparser.ast.CompilationUnit declarationUnit, PrototypeDescription<?> prsd, com.github.javaparser.ast.body.TypeDeclaration<?> type, com.github.javaparser.ast.expr.AnnotationExpr prototype)
     
    static void
    generateCodeForPrototype(com.github.javaparser.ast.CompilationUnit parser, PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> prsd, com.github.javaparser.ast.body.TypeDeclaration<?> type, com.github.javaparser.ast.expr.AnnotationExpr prototype)
     
    static Optional<com.github.javaparser.ast.expr.AnnotationExpr>
    getCodeAnnotation(com.github.javaparser.ast.body.BodyDeclaration<?> type)
     
     
    static List<org.apache.commons.lang3.tuple.Pair<String,Boolean>>
    getGenericsList(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, com.github.javaparser.ast.type.ClassOrInterfaceType type, boolean isCollection)
     
    getProperties(com.github.javaparser.ast.expr.AnnotationExpr prototype)
     
    static List<String>
    handleGenericTypes(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, com.github.javaparser.ast.type.ClassOrInterfaceType type, Map<String,PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration>> prototypeMap)
     
    static String
    handleType(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration source, com.github.javaparser.ast.body.ClassOrInterfaceDeclaration destination, com.github.javaparser.ast.type.Type type)
     
    static String
    handleType(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration source, com.github.javaparser.ast.body.ClassOrInterfaceDeclaration destination, com.github.javaparser.ast.type.Type type, Map<String,PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration>> prototypeMap)
     
    static String
    handleType(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, com.github.javaparser.ast.type.Type type)
     
    static String
    handleType(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, com.github.javaparser.ast.type.Type type, Map<String,PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration>> prototypeMap)
     
    static String
    handleType(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, String type, boolean embedded)
     
    static String
    handleType(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, String type, boolean embedded, Map<String,PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration>> prototypeMap)
     

    Methods inherited from class java.lang.Object

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

  • Method Details

    • generateCodeForClass

      public static void generateCodeForClass(com.github.javaparser.ast.CompilationUnit parser)
    • generateCodeForClass

      public static void generateCodeForClass(com.github.javaparser.ast.CompilationUnit parser, PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> prsd)
    • generateCodeForPrototype

      public static void generateCodeForPrototype(com.github.javaparser.ast.CompilationUnit parser, PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> prsd, com.github.javaparser.ast.body.TypeDeclaration<?> type, com.github.javaparser.ast.expr.AnnotationExpr prototype)
    • calcInterfacePackage

      protected static String calcInterfacePackage(PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> prsd)
    • getCodeAnnotation

      public static Optional<com.github.javaparser.ast.expr.AnnotationExpr> getCodeAnnotation(com.github.javaparser.ast.body.BodyDeclaration<?> type)
    • getCodeAnnotation

      public static Optional<Annotation> getCodeAnnotation(Class cls)
    • getProperties

      public static Structures.PrototypeDataHandler getProperties(com.github.javaparser.ast.expr.AnnotationExpr prototype)
    • checkEnrichers

      public static void checkEnrichers(List<PrototypeEnricher> list, Class enricher)
    • handleType

      public static String handleType(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration source, com.github.javaparser.ast.body.ClassOrInterfaceDeclaration destination, com.github.javaparser.ast.type.Type type)
    • handleType

      public static String handleType(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration source, com.github.javaparser.ast.body.ClassOrInterfaceDeclaration destination, com.github.javaparser.ast.type.Type type, Map<String,PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration>> prototypeMap)
    • handleType

      public static String handleType(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, com.github.javaparser.ast.type.Type type)
    • handleType

      public static String handleType(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, com.github.javaparser.ast.type.Type type, Map<String,PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration>> prototypeMap)
    • handleGenericTypes

      public static List<String> handleGenericTypes(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, com.github.javaparser.ast.type.ClassOrInterfaceType type, Map<String,PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration>> prototypeMap)
    • getGenericsList

      public static List<org.apache.commons.lang3.tuple.Pair<String,Boolean>> getGenericsList(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, com.github.javaparser.ast.type.ClassOrInterfaceType type, boolean isCollection)
    • handleType

      public static String handleType(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, String type, boolean embedded)
    • handleType

      public static String handleType(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, String type, boolean embedded, Map<String,PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration>> prototypeMap)
    • findInheritanceProperty

      public static <T> T findInheritanceProperty(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration spec, PrototypeData properties, BiFunction<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration,PrototypeData,T> func)
    • addGetter

      public static void addGetter(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration type, com.github.javaparser.ast.body.ClassOrInterfaceDeclaration spec, com.github.javaparser.ast.body.MethodDeclaration declaration, boolean isClass, PrototypeField field)
    • addSetter

      public static void addSetter(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration type, com.github.javaparser.ast.body.ClassOrInterfaceDeclaration spec, com.github.javaparser.ast.body.MethodDeclaration declaration, boolean isClass, PrototypeField field)
    • addMethod

      public static void addMethod(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration spec, Method declaration, Map<String,String> signature)
    • generateCodeForEnum

      public static void generateCodeForEnum(com.github.javaparser.ast.CompilationUnit declarationUnit, PrototypeDescription<?> prsd, com.github.javaparser.ast.body.TypeDeclaration<?> type, com.github.javaparser.ast.expr.AnnotationExpr prototype)
    • generateCodeForConstants

      public static com.github.javaparser.ast.CompilationUnit generateCodeForConstants()
    • generateCodeForElements

      public static void generateCodeForElements(PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> prsd)