Class JavaCodeFactory
java.lang.Object
org.tentackle.maven.plugin.wizard.pdodata.JavaCodeFactory
Factory generating Java code that creates PDOs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanBy default, the variables of the created entities are reused for the 2nd, 3rd, etc...static final StringStereotype for attributes and relations to skip test code generation.static IntegerIfdistinctVariablesis true, the variable names are numbered. -
Method Summary
Modifier and TypeMethodDescriptiongenerate()Generates the Java code.static StringgenerateCode(Map<String, Boolean> codePaths, DataObject... dataObjects) Generates code from a data object template.
-
Field Details
-
NOTEST_STEREOTYPE
Stereotype for attributes and relations to skip test code generation.- See Also:
-
distinctVariables
public static boolean distinctVariablesBy default, the variables of the created entities are reused for the 2nd, 3rd, etc... instances. If this flag is true, the variables names are numbered starting atvariableOffset. -
variableOffset
IfdistinctVariablesis true, the variable names are numbered. IfvariableOffsetis null, the first instance has no number, otherwise it starts with the given offset.
-
-
Method Details
-
generateCode
Generates code from a data object template.- Parameters:
codePaths- optional code paths configuration mapdataObjects- the data objects- Returns:
- the Java code
-
generate
Generates the Java code.- Returns:
- the code
-