Package org.codehaus.modello.plugin
Class AbstractModelloGenerator
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.codehaus.modello.plugin.AbstractModelloGenerator
-
- All Implemented Interfaces:
ModelloGenerator
,org.codehaus.plexus.logging.LogEnabled
,org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Direct Known Subclasses:
AbstractJavaModelloGenerator
,AbstractXmlGenerator
public abstract class AbstractModelloGenerator extends org.codehaus.plexus.logging.AbstractLogEnabled implements ModelloGenerator, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Author:
- Jason van Zyl, Emmanuel Venisse
-
-
Constructor Summary
Constructors Constructor Description AbstractModelloGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected String
capitalise(String str)
void
contextualize(org.codehaus.plexus.context.Context ctx)
protected org.sonatype.plexus.build.incremental.BuildContext
getBuildContext()
protected String
getEncoding()
protected List<ModelField>
getFieldsForClass(ModelClass modelClass)
Return the child fields of this class.protected Version
getGeneratedVersion()
protected String
getHeader()
protected Model
getModel()
File
getOutputDirectory()
protected String
getParameter(String name, Properties parameters)
Deprecated.UsegetParameter(Properties, String)
insteadprotected String
getParameter(Properties parameters, String name)
protected String
getParameter(Properties parameters, String name, String defaultValue)
protected void
initialize(Model model, Properties parameters)
protected boolean
isClassInModel(String fieldType, Model model)
protected boolean
isCollection(String fieldType)
protected boolean
isEmpty(String string)
protected boolean
isInnerAssociation(ModelField field)
protected boolean
isMap(String fieldType)
protected boolean
isPackageWithVersion()
static String
singular(String name)
static String
uncapitalise(String str)
-
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
-
Methods inherited from interface org.codehaus.modello.plugin.ModelloGenerator
generate
-
-
-
-
Method Detail
-
initialize
protected void initialize(Model model, Properties parameters) throws ModelloException
- Throws:
ModelloException
-
getModel
protected Model getModel()
-
getGeneratedVersion
protected Version getGeneratedVersion()
-
isPackageWithVersion
protected boolean isPackageWithVersion()
-
getOutputDirectory
public File getOutputDirectory()
-
getEncoding
protected String getEncoding()
-
getHeader
protected String getHeader()
-
getFieldsForClass
protected 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(String fieldType)
-
isCollection
protected boolean isCollection(String fieldType)
-
isEmpty
protected boolean isEmpty(String string)
-
getParameter
protected String getParameter(String name, Properties parameters)
Deprecated.UsegetParameter(Properties, String)
instead
-
getParameter
protected String getParameter(Properties parameters, String name)
-
getParameter
protected String getParameter(Properties parameters, String name, String defaultValue)
-
contextualize
public void contextualize(org.codehaus.plexus.context.Context ctx) throws org.codehaus.plexus.context.ContextException
- Specified by:
contextualize
in interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Throws:
org.codehaus.plexus.context.ContextException
-
getBuildContext
protected org.sonatype.plexus.build.incremental.BuildContext getBuildContext()
-
-