org.codehaus.modello.plugin.java
Class JavaModelloGenerator
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.codehaus.modello.plugin.AbstractModelloGenerator
org.codehaus.modello.plugin.java.JavaModelloGenerator
- All Implemented Interfaces:
- org.codehaus.plexus.logging.LogEnabled, ModelloGenerator
- public class JavaModelloGenerator
- extends AbstractModelloGenerator
- Version:
- $Id: JavaModelloGenerator.java 446 2005-07-23 03:46:41Z trygvis $
- Author:
- Jason van Zyl
Field Summary |
private static java.lang.String |
EOL
|
Fields inherited from class org.codehaus.plexus.logging.AbstractLogEnabled |
|
Methods inherited from class org.codehaus.modello.plugin.AbstractModelloGenerator |
addModelImports, capitalise, getGeneratedVersion, getModel, getOutputDirectory, getParameter, getParameter, getParameter, initialize, isClassInModel, isCollection, isEmpty, 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 |
EOL
private static final java.lang.String EOL
JavaModelloGenerator
public JavaModelloGenerator()
generate
public void generate(Model model,
java.util.Properties parameters)
throws ModelloException
- Throws:
ModelloException
generateJava
private void generateJava()
throws ModelloException,
java.io.IOException
- Throws:
ModelloException
java.io.IOException
generateEquals
private JMethod generateEquals(ModelClass modelClass)
generateHashCode
private JMethod generateHashCode(ModelClass modelClass)
createHashCodeForField
private java.lang.String createHashCodeForField(ModelField identifier)
createField
private JField createField(ModelField modelField)
createField
private void createField(JClass jClass,
ModelField modelField)
createGetter
private JMethod createGetter(JField field,
ModelField modelField)
createSetter
private JMethod createSetter(JField field,
ModelField modelField)
createAssociation
private void createAssociation(JClass jClass,
ModelAssociation modelAssociation)
createAdder
private void createAdder(ModelAssociation modelAssociation,
JClass jClass)
isBidirectionalAssociation
private boolean isBidirectionalAssociation(ModelAssociation association)