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 String MIX_IN_EXTENSION  
  • 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)  
    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 generateCodeForConstants()  
    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.TypeDeclaration<?> 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)  
    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)
    • getCodeAnnotation

      public static Optional<com.github.javaparser.ast.expr.AnnotationExpr> getCodeAnnotation​(com.github.javaparser.ast.body.TypeDeclaration<?> 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)
    • 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()