Package net.mcreator.generator
Class GeneratorTemplate
java.lang.Object
net.mcreator.generator.GeneratorTemplate
- Direct Known Subclasses:
ListTemplate
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataModelEntry
(String key, Object value) boolean
getFile()
Map
<?, ?> Used to determine what template belongs to what file.int
hashCode()
boolean
isHidden()
boolean
shouldBeSkippedBasedOnCondition
(Generator generator, Object conditionData) toGeneratorFile
(String code)
-
Method Details
-
getFile
- Returns:
- File where this GeneratorTemplate should be generated into
-
getTemplateIdentifier
Used to determine what template belongs to what file. Same GeneratorTemplate file of different MEs can belong to the same template entry in element definition that was used to generate said file.Currently used to determine which files to copy to which files when duplicating ME with locked code.
- Returns:
- String that is equal for all GeneratorTemplate generated for the same template entry in element definition
-
isHidden
public boolean isHidden()- Returns:
- true if this template should be visually hidden in the UI
-
getUsercodeComment
- Returns:
- usercode comment format for this template
-
getDataModel
- Returns:
- Data model that is used to generate this GeneratorTemplate (data accessible in FTL templates)
-
addDataModelEntry
-
toGeneratorFile
-
shouldBeSkippedBasedOnCondition
-
getTemplateDefinition
- Returns:
- Map defining the template properties that generator uses
-
equals
-
hashCode
public int hashCode()
-