org.codehaus.modello.plugin.java
Class AbstractJavaModelloGenerator
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.codehaus.modello.plugin.AbstractModelloGenerator
org.codehaus.modello.plugin.java.AbstractJavaModelloGenerator
- All Implemented Interfaces:
- ModelloGenerator, org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Direct Known Subclasses:
- AbstractXmlJavaGenerator, ConverterGenerator, JavaModelloGenerator
public abstract class AbstractJavaModelloGenerator
- extends AbstractModelloGenerator
AbstractJavaModelloGenerator - similar in scope to AbstractModelloGenerator
but with features that
java generators can use.
- Version:
- $Id: AbstractJavaModelloGenerator.java 1311 2009-08-20 23:28:35Z hboutemy $
- Author:
- Joakim Erdfelt
Methods inherited from class org.codehaus.modello.plugin.AbstractModelloGenerator |
capitalise, contextualize, getBuildContext, getEncoding, getFieldsForClass, getGeneratedVersion, getHeader, getModel, getOutputDirectory, getParameter, getParameter, getParameter, isClassInModel, isCollection, isEmpty, isInnerAssociation, isMap, isPackageWithVersion, singular, uncapitalise |
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
useJava5
protected boolean useJava5
DEFAULT_DATE_FORMAT
protected static final String DEFAULT_DATE_FORMAT
- See Also:
- Constant Field Values
AbstractJavaModelloGenerator
public AbstractJavaModelloGenerator()
initialize
protected void initialize(Model model,
Properties parameters)
throws ModelloException
- Overrides:
initialize
in class AbstractModelloGenerator
- Throws:
ModelloException
newJSourceWriter
protected JSourceWriter newJSourceWriter(String packageName,
String className)
throws 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:
IOException
initHeader
protected void initHeader(JClass clazz)
initHeader
protected void initHeader(JInterface interfaze)
suppressAllWarnings
protected void suppressAllWarnings(Model objectModel,
JStructure structure)
addModelImports
protected void addModelImports(JClass jClass,
BaseElement baseElem)
throws ModelloException
- Throws:
ModelloException
getPrefix
protected String getPrefix(JavaFieldMetadata javaFieldMetadata)
getDefaultValue
protected String getDefaultValue(ModelAssociation association)
getJavaDefaultValue
protected String getJavaDefaultValue(ModelField modelField)
throws ModelloException
- Throws:
ModelloException
getValueChecker
protected String getValueChecker(String type,
String value,
ModelField field)
throws ModelloException
- Throws:
ModelloException
Copyright © 2001-2013 Codehaus. All Rights Reserved.