Class Generator
java.lang.Object
net.binis.codegen.generation.core.Generator
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddGetter(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 voidaddMethod(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration spec, Method declaration, Map<String, String> signature) static voidaddSetter(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 StringcalcInterfacePackage(PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> prsd) static voidcheckEnrichers(List<PrototypeEnricher> list, Class enricher) static <T> TfindInheritanceProperty(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration spec, PrototypeData properties, BiFunction<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration, PrototypeData, T> func) static voidgenerateCodeForClass(com.github.javaparser.ast.CompilationUnit parser) static voidgenerateCodeForClass(com.github.javaparser.ast.CompilationUnit parser, PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> prsd) static com.github.javaparser.ast.CompilationUnitstatic voidgenerateCodeForElements(PrototypeDescription<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> prsd) static voidgenerateCodeForEnum(com.github.javaparser.ast.CompilationUnit declarationUnit, PrototypeDescription<?> prsd, com.github.javaparser.ast.body.TypeDeclaration<?> type, com.github.javaparser.ast.expr.AnnotationExpr prototype) static voidgenerateCodeForPrototype(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 Optional<Annotation>getCodeAnnotation(Class cls) 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) 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 StringhandleType(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration source, com.github.javaparser.ast.body.ClassOrInterfaceDeclaration destination, com.github.javaparser.ast.type.Type type) static StringhandleType(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 StringhandleType(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, com.github.javaparser.ast.type.Type type) static StringhandleType(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 StringhandleType(com.github.javaparser.ast.CompilationUnit source, com.github.javaparser.ast.CompilationUnit destination, String type, boolean embedded) static StringhandleType(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)
-
Field Details
-
MIX_IN_EXTENSION
- See Also:
-
-
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
-
getProperties
public static Structures.PrototypeDataHandler getProperties(com.github.javaparser.ast.expr.AnnotationExpr prototype) -
checkEnrichers
-
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
-
handleType
-
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
-
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)
-