Class AbstractJavaCodeGenerator
java.lang.Object
io.lionweb.gradleplugin.generators.AbstractJavaCodeGenerator
- Direct Known Subclasses:
LanguageJavaCodeGenerator,NodeClassesJavaCodeGenerator
Represents an abstract generator for Java code. This class provides foundational utilities for
creating Java source files, managing destination directories, and ensuring proper naming
conventions to avoid conflicts with reserved Java keywords.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractJavaCodeGenerator(File destinationDir, @NotNull Map<String, String> mappings) Constructs an AbstractJavaCodeGenerator with a specified destination directory. -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringgetterName(String name) protected StringtoVariableName(String name)
-
Field Details
-
destinationDir
-
mappings
-
JAVA_KEYWORDS
-
-
Constructor Details
-
AbstractJavaCodeGenerator
protected AbstractJavaCodeGenerator(@Nonnull File destinationDir, @NotNull @NotNull Map<String, String> mappings) Constructs an AbstractJavaCodeGenerator with a specified destination directory.- Parameters:
destinationDir- the directory where the generated code will be stored; must not be nullmappings- a mapping of custom type names to their corresponding Java types; must not be null- Throws:
NullPointerException- if the destinationDir is null
-
-
Method Details
-
toVariableName
-
getterName
-