Package org.codehaus.modello.plugin.java
Class AbstractJavaModelloGenerator
java.lang.Object
org.codehaus.modello.plugin.AbstractModelloGenerator
org.codehaus.modello.plugin.java.AbstractJavaModelloGenerator
- All Implemented Interfaces:
ModelloGenerator
- Direct Known Subclasses:
JavaModelloGenerator
AbstractJavaModelloGenerator - similar in scope to
AbstractModelloGenerator but with features that
java generators can use.- Author:
- Joakim Erdfelt
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddModelImport(JClass jClass, ModelType modelType, String basePackageName) protected voidaddModelImports(JClass jClass, BaseElement baseElem) protected List<ModelClass> getClasses(Model model) protected StringgetDefaultValue(ModelAssociation association) protected StringgetJavaDefaultValue(ModelField modelField) protected StringgetPrefix(JavaFieldMetadata javaFieldMetadata) protected StringgetValueChecker(String type, String value, ModelField field) protected voidinitHeader(JClass clazz) protected voidinitHeader(JInterface interfaze) protected voidinitialize(Model model, Map<String, Object> parameters) protected booleanisJavaEnabled(ModelClass modelClass) protected booleanisRelevant(ModelClass modelClass) protected booleanisTrackingSupport(ModelClass modelClass) protected JSourceWriternewJSourceWriter(String packageName, String className) Create a new java source file writer, with configured encoding.protected voidsuppressAllWarnings(Model objectModel, JStructure structure) Methods inherited from class org.codehaus.modello.plugin.AbstractModelloGenerator
capitalise, getBuildContext, getEncoding, getFieldsForClass, getGeneratedHeader, getGeneratedVersion, getHeader, getLicenseHeader, getLogger, getModel, getOutputDirectory, getParameter, isClassInModel, isCollection, isEmpty, isInnerAssociation, isMap, isPackageWithVersion, newWriter, newWriter, requireParameter, singular, uncapitaliseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codehaus.modello.plugin.ModelloGenerator
generate
-
Field Details
-
domAsXpp3
protected boolean domAsXpp3 -
DEFAULT_DATE_FORMAT
- See Also:
-
-
Constructor Details
-
AbstractJavaModelloGenerator
public AbstractJavaModelloGenerator()
-
-
Method Details
-
initialize
- Overrides:
initializein classAbstractModelloGenerator- Throws:
ModelloException
-
newJSourceWriter
Create a new java source file writer, with configured encoding.- Parameters:
packageName- the package of the source file to createclassName- the class of the source file to create- Returns:
- a JSourceWriter with configured encoding
- Throws:
IOException
-
initHeader
-
initHeader
-
suppressAllWarnings
-
addModelImports
- Throws:
ModelloException
-
addModelImport
-
getPrefix
-
getDefaultValue
-
getJavaDefaultValue
- Throws:
ModelloException
-
getValueChecker
protected String getValueChecker(String type, String value, ModelField field) throws ModelloException - Throws:
ModelloException
-
getClasses
-
isRelevant
-
isJavaEnabled
-
isTrackingSupport
-