org.codehaus.modello.plugin.java
Class JavaModelloGenerator

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.codehaus.modello.plugin.AbstractModelloGenerator
          extended byorg.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.modello.plugin.AbstractModelloGenerator
 
Fields inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
 
Constructor Summary
JavaModelloGenerator()
           
 
Method Summary
private  void createAdder(ModelAssociation modelAssociation, JClass jClass)
           
private  void createAssociation(JClass jClass, ModelAssociation modelAssociation)
           
private  void createField(JClass jClass, ModelField modelField)
           
private  JField createField(ModelField modelField)
           
private  JMethod createGetter(JField field, ModelField modelField)
           
private  java.lang.String createHashCodeForField(ModelField identifier)
           
private  JMethod createSetter(JField field, ModelField modelField)
           
 void generate(Model model, java.util.Properties parameters)
           
private  JMethod generateEquals(ModelClass modelClass)
           
private  JMethod generateHashCode(ModelClass modelClass)
           
private  void generateJava()
           
private  boolean isBidirectionalAssociation(ModelAssociation association)
           
 
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
 

Field Detail

EOL

private static final java.lang.String EOL
Constructor Detail

JavaModelloGenerator

public JavaModelloGenerator()
Method Detail

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)