Package de.monticore.generating
Class GeneratorEngine
java.lang.Object
de.monticore.generating.GeneratorEngine
Represents the whole generator engine component.
Clients usually need only this class when generating.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected GeneratorSetupContains all configuration datastatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanexistsHandwrittenClass(MCPath targetPath, String qualifiedName) Check whewther an handwritten version of that class already exits and shall be integrated (e.g.Processes the templatetemplateNamewith the giventemplateArgumentsand returns the content as StringBuilder.voidProcesses the templatetemplateNamewith thenodeand the giventemplateArgumentsand writes the content into thefilePath.voidProcesses the templatetemplateNamewith thenodeand the giventemplateArgumentsand writes the content into thefilePath.voidgenerateNoA(String templateName, Writer writer, Object... templateArguments) Processes the templatetemplateNamewith thenodeand the giventemplateArgumentsand writes the content into thefilePath.generateNoA(String templateName, Object... templateArguments) Processes the templatetemplateNamewith the giventemplateArgumentsand returns the content as StringBuilder.voidgenerateNoA(String templateName, Path filePath, Object... templateArguments) Processes the templatetemplateNamewith thenodeand the giventemplateArgumentsand writes the content into thefilePath.
-
Field Details
-
DEFAULT_FILE_EXTENSION
- See Also:
-
TOP_NAME_EXTENSION
- See Also:
-
setup
Contains all configuration data
-
-
Constructor Details
-
GeneratorEngine
-
-
Method Details
-
generate
Processes the templatetemplateNamewith thenodeand the giventemplateArgumentsand writes the content into thefilePath. Note: Unless not absolute, thefilePathis relative to the configured output directory specified in theGeneratorSetup.- Parameters:
templateName- the template to be processesfilePath- the file path in which the content is to be writtennode- the ast nodetemplateArguments- additional template arguments (if needed).
-
generateNoA
Processes the templatetemplateNamewith thenodeand the giventemplateArgumentsand writes the content into thefilePath. Note: Unless not absolute, thefilePathis relative to the configured output directory specified in theGeneratorSetup.- Parameters:
templateName- the template to be processesfilePath- the file path in which the content is to be writtentemplateArguments- additional template arguments (if needed).
-
generate
Processes the templatetemplateNamewith thenodeand the giventemplateArgumentsand writes the content into thefilePath. Note: Unless not absolute, thefilePathis relative to the configured output directory specified in theGeneratorSetup.- Parameters:
templateName- the template to be processeswriter- the writer in which the content is to be writtennode- the ast nodetemplateArguments- additional template arguments (if needed).
-
generateNoA
Processes the templatetemplateNamewith thenodeand the giventemplateArgumentsand writes the content into thefilePath. Note: Unless not absolute, thefilePathis relative to the configured output directory specified in theGeneratorSetup.- Parameters:
templateName- the template to be processeswriter- the writer in which the content is to be writtentemplateArguments- additional template arguments (if needed).
-
generate
Processes the templatetemplateNamewith the giventemplateArgumentsand returns the content as StringBuilder.- Parameters:
templateName- the template to be processesnode- the ast nodetemplateArguments- additional template arguments (if needed).
-
generateNoA
Processes the templatetemplateNamewith the giventemplateArgumentsand returns the content as StringBuilder.- Parameters:
templateName- the template to be processestemplateArguments- additional template arguments (if needed).
-
existsHandwrittenClass
Check whewther an handwritten version of that class already exits and shall be integrated (e.g. to apply TOP mechanism)
-