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.AbstractModelloGenerator
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 void
addModelImport
(JClass jClass, org.codehaus.modello.model.ModelType modelType, String basePackageName) protected void
addModelImports
(JClass jClass, org.codehaus.modello.model.BaseElement baseElem) protected List
<org.codehaus.modello.model.ModelClass> getClasses
(org.codehaus.modello.model.Model model) protected String
getDefaultValue
(org.codehaus.modello.model.ModelAssociation association) protected String
getJavaDefaultValue
(org.codehaus.modello.model.ModelField modelField) protected String
getPrefix
(JavaFieldMetadata javaFieldMetadata) protected String
getValueChecker
(String type, String value, org.codehaus.modello.model.ModelField field) protected final boolean
hasJavaSourceSupport
(int source) protected void
initHeader
(JClass clazz) protected void
initHeader
(JInterface interfaze) protected void
initialize
(org.codehaus.modello.model.Model model, Properties parameters) protected boolean
isJavaEnabled
(org.codehaus.modello.model.ModelClass modelClass) protected boolean
isRelevant
(org.codehaus.modello.model.ModelClass modelClass) protected boolean
isTrackingSupport
(org.codehaus.modello.model.ModelClass modelClass) protected JSourceWriter
newJSourceWriter
(String packageName, String className) Create a new java source file writer, with configured encoding.protected void
suppressAllWarnings
(org.codehaus.modello.model.Model objectModel, JStructure structure) Methods inherited from class org.codehaus.modello.plugin.AbstractModelloGenerator
capitalise, getBuildContext, getEncoding, getFieldsForClass, getGeneratedVersion, getHeader, getLogger, getModel, getOutputDirectory, getParameter, getParameter, getParameter, isClassInModel, isCollection, isEmpty, isInnerAssociation, isMap, isPackageWithVersion, newWriter, newWriter, singular, uncapitalise
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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
protected void initialize(org.codehaus.modello.model.Model model, Properties parameters) throws org.codehaus.modello.ModelloException - Overrides:
initialize
in classorg.codehaus.modello.plugin.AbstractModelloGenerator
- Throws:
org.codehaus.modello.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
-
hasJavaSourceSupport
protected final boolean hasJavaSourceSupport(int source) -
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
-
getPrefix
-
getDefaultValue
-
getJavaDefaultValue
protected String getJavaDefaultValue(org.codehaus.modello.model.ModelField modelField) throws org.codehaus.modello.ModelloException - Throws:
org.codehaus.modello.ModelloException
-
getValueChecker
protected String getValueChecker(String type, String value, org.codehaus.modello.model.ModelField field) throws org.codehaus.modello.ModelloException - Throws:
org.codehaus.modello.ModelloException
-
getClasses
protected 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)
-