org.codehaus.modello.plugin
Class AbstractModelloGenerator
java.lang.Object
AbstractLogEnabled
org.codehaus.modello.plugin.AbstractModelloGenerator
- All Implemented Interfaces:
- ModelloGenerator
- Direct Known Subclasses:
- AbstractJavaModelloGenerator, AbstractXmlGenerator
public abstract class AbstractModelloGenerator
- extends AbstractLogEnabled
- implements ModelloGenerator
- Version:
- $Id: AbstractModelloGenerator.java 1413 2010-02-13 21:23:01Z hboutemy $
- Author:
- Jason van Zyl, Emmanuel Venisse
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractModelloGenerator
public AbstractModelloGenerator()
initialize
protected void initialize(Model model,
java.util.Properties parameters)
throws ModelloException
- Throws:
ModelloException
getModel
protected Model getModel()
getGeneratedVersion
protected Version getGeneratedVersion()
isPackageWithVersion
protected boolean isPackageWithVersion()
getOutputDirectory
public java.io.File getOutputDirectory()
getEncoding
protected java.lang.String getEncoding()
getHeader
protected java.lang.String getHeader()
isClassInModel
protected boolean isClassInModel(java.lang.String fieldType,
Model model)
getFieldsForClass
protected java.util.List<ModelField> getFieldsForClass(ModelClass modelClass)
- Return the child fields of this class.
- Parameters:
modelClass
- current class
- Returns:
- the list of fields of this class
isInnerAssociation
protected boolean isInnerAssociation(ModelField field)
isMap
protected boolean isMap(java.lang.String fieldType)
isCollection
protected boolean isCollection(java.lang.String fieldType)
capitalise
protected java.lang.String capitalise(java.lang.String str)
singular
public static java.lang.String singular(java.lang.String name)
uncapitalise
public static java.lang.String uncapitalise(java.lang.String str)
isEmpty
protected boolean isEmpty(java.lang.String string)
getParameter
protected java.lang.String getParameter(java.lang.String name,
java.util.Properties parameters)
- Deprecated. @{link Use getParameter( Properties, String )} instead
getParameter
protected java.lang.String getParameter(java.util.Properties parameters,
java.lang.String name)
getParameter
protected java.lang.String getParameter(java.util.Properties parameters,
java.lang.String name,
java.lang.String defaultValue)
contextualize
public void contextualize(Context ctx)
throws ContextException
- Throws:
ContextException
getBuildContext
protected org.sonatype.plexus.build.incremental.BuildContext getBuildContext()