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:
org.codehaus.modello.plugin.ModelloGenerator
- Direct Known Subclasses:
JavaModelloGenerator
public abstract class AbstractJavaModelloGenerator extends org.codehaus.modello.plugin.AbstractModelloGeneratorAbstractJavaModelloGenerator - similar in scope toAbstractModelloGeneratorbut with features that java generators can use.- Author:
- Joakim Erdfelt
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringDEFAULT_DATE_FORMATprotected booleandomAsXpp3
-
Constructor Summary
Constructors Constructor Description AbstractJavaModelloGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddModelImport(JClass jClass, org.codehaus.modello.model.ModelType modelType, java.lang.String basePackageName)protected voidaddModelImports(JClass jClass, org.codehaus.modello.model.BaseElement baseElem)protected java.util.List<org.codehaus.modello.model.ModelClass>getClasses(org.codehaus.modello.model.Model model)protected java.lang.StringgetDefaultValue(org.codehaus.modello.model.ModelAssociation association)protected java.lang.StringgetJavaDefaultValue(org.codehaus.modello.model.ModelField modelField)protected java.lang.StringgetPrefix(JavaFieldMetadata javaFieldMetadata)protected java.lang.StringgetValueChecker(java.lang.String type, java.lang.String value, org.codehaus.modello.model.ModelField field)protected voidinitHeader(JClass clazz)protected voidinitHeader(JInterface interfaze)protected voidinitialize(org.codehaus.modello.model.Model model, java.util.Map<java.lang.String,java.lang.Object> parameters)protected booleanisJavaEnabled(org.codehaus.modello.model.ModelClass modelClass)protected booleanisRelevant(org.codehaus.modello.model.ModelClass modelClass)protected booleanisTrackingSupport(org.codehaus.modello.model.ModelClass modelClass)protected JSourceWriternewJSourceWriter(java.lang.String packageName, java.lang.String className)Create a new java source file writer, with configured encoding.protected voidsuppressAllWarnings(org.codehaus.modello.model.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, uncapitalise
-
-
-
-
Field Detail
-
domAsXpp3
protected boolean domAsXpp3
-
DEFAULT_DATE_FORMAT
protected static final java.lang.String DEFAULT_DATE_FORMAT
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
protected void initialize(org.codehaus.modello.model.Model model, java.util.Map<java.lang.String,java.lang.Object> parameters) throws org.codehaus.modello.ModelloException- Overrides:
initializein classorg.codehaus.modello.plugin.AbstractModelloGenerator- Throws:
org.codehaus.modello.ModelloException
-
newJSourceWriter
protected JSourceWriter newJSourceWriter(java.lang.String packageName, java.lang.String className) throws java.io.IOException
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:
java.io.IOException
-
initHeader
protected void initHeader(JClass clazz)
-
initHeader
protected void initHeader(JInterface interfaze)
-
suppressAllWarnings
protected void suppressAllWarnings(org.codehaus.modello.model.Model objectModel, JStructure structure)
-
addModelImports
protected void addModelImports(JClass jClass, org.codehaus.modello.model.BaseElement baseElem) throws org.codehaus.modello.ModelloException
- Throws:
org.codehaus.modello.ModelloException
-
addModelImport
protected void addModelImport(JClass jClass, org.codehaus.modello.model.ModelType modelType, java.lang.String basePackageName)
-
getPrefix
protected java.lang.String getPrefix(JavaFieldMetadata javaFieldMetadata)
-
getDefaultValue
protected java.lang.String getDefaultValue(org.codehaus.modello.model.ModelAssociation association)
-
getJavaDefaultValue
protected java.lang.String getJavaDefaultValue(org.codehaus.modello.model.ModelField modelField) throws org.codehaus.modello.ModelloException- Throws:
org.codehaus.modello.ModelloException
-
getValueChecker
protected java.lang.String getValueChecker(java.lang.String type, java.lang.String value, org.codehaus.modello.model.ModelField field) throws org.codehaus.modello.ModelloException- Throws:
org.codehaus.modello.ModelloException
-
getClasses
protected java.util.List<org.codehaus.modello.model.ModelClass> getClasses(org.codehaus.modello.model.Model model)
-
isRelevant
protected boolean isRelevant(org.codehaus.modello.model.ModelClass modelClass)
-
isJavaEnabled
protected boolean isJavaEnabled(org.codehaus.modello.model.ModelClass modelClass)
-
isTrackingSupport
protected boolean isTrackingSupport(org.codehaus.modello.model.ModelClass modelClass)
-
-