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,VelocityGenerator
public abstract class AbstractModelloGenerator
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements ModelloGenerator, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringcapitalise(String str) voidcontextualize(org.codehaus.plexus.context.Context ctx) protected org.sonatype.plexus.build.incremental.BuildContextprotected Stringprotected List<ModelField> getFieldsForClass(ModelClass modelClass) Return the child fields of this class.protected Versionprotected Stringprotected ModelgetModel()protected StringgetParameter(String name, Properties parameters) Deprecated.protected StringgetParameter(Properties parameters, String name) protected StringgetParameter(Properties parameters, String name, String defaultValue) protected voidinitialize(Model model, Properties parameters) protected booleanisClassInModel(String fieldType, Model model) protected booleanisCollection(String fieldType) protected booleanprotected booleanisInnerAssociation(ModelField field) protected booleanprotected booleanprotected Writerprotected Writerstatic Stringstatic Stringuncapitalise(String str) Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codehaus.modello.plugin.ModelloGenerator
generate
-
Field Details
-
model
-
outputDirectory
-
generatedVersion
-
packageWithVersion
private boolean packageWithVersion -
encoding
-
buildContext
private org.sonatype.plexus.build.incremental.BuildContext buildContext
-
-
Constructor Details
-
AbstractModelloGenerator
public AbstractModelloGenerator()
-
-
Method Details
-
initialize
- Throws:
ModelloException
-
getModel
-
getGeneratedVersion
-
isPackageWithVersion
protected boolean isPackageWithVersion() -
getOutputDirectory
-
getEncoding
-
getHeader
-
isClassInModel
-
getFieldsForClass
Return the child fields of this class.- Parameters:
modelClass- current class- Returns:
- the list of fields of this class
-
isInnerAssociation
-
isMap
-
isCollection
-
capitalise
-
singular
-
uncapitalise
-
isEmpty
-
getParameter
Deprecated.UsegetParameter(Properties, String)instead- Parameters:
name- parameter nameparameters- the properties- Returns:
- the parameter value
-
getParameter
-
getParameter
-
contextualize
public void contextualize(org.codehaus.plexus.context.Context ctx) throws org.codehaus.plexus.context.ContextException - Specified by:
contextualizein interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable- Throws:
org.codehaus.plexus.context.ContextException
-
getBuildContext
protected org.sonatype.plexus.build.incremental.BuildContext getBuildContext() -
newWriter
- Throws:
IOException
-
newWriter
- Throws:
IOException
-
getParameter(Properties, String)instead