Class AbstractJavaModelloGenerator

java.lang.Object
org.codehaus.modello.plugin.AbstractModelloGenerator
org.codehaus.modello.plugin.java.AbstractJavaModelloGenerator
All Implemented Interfaces:
org.codehaus.modello.plugin.ModelloGenerator
Direct Known Subclasses:
JavaModelloGenerator

public abstract class AbstractJavaModelloGenerator extends org.codehaus.modello.plugin.AbstractModelloGenerator
AbstractJavaModelloGenerator - similar in scope to AbstractModelloGenerator but with features that java generators can use.
Author:
Joakim Erdfelt
  • Field Details

    • domAsXpp3

      protected boolean domAsXpp3
    • DEFAULT_DATE_FORMAT

      protected static final String DEFAULT_DATE_FORMAT
      See Also:
  • Constructor Details

    • AbstractJavaModelloGenerator

      public AbstractJavaModelloGenerator()
  • Method Details

    • initialize

      protected void initialize(org.codehaus.modello.model.Model model, Map<String,Object> parameters) throws org.codehaus.modello.ModelloException
      Overrides:
      initialize in class org.codehaus.modello.plugin.AbstractModelloGenerator
      Throws:
      org.codehaus.modello.ModelloException
    • newJSourceWriter

      protected JSourceWriter newJSourceWriter(String packageName, String className) throws IOException
      Create a new java source file writer, with configured encoding.
      Parameters:
      packageName - the package of the source file to create
      className - the class of the source file to create
      Returns:
      a JSourceWriter with configured encoding
      Throws:
      IOException
    • initHeader

      protected void initHeader(JClass clazz)
    • initHeader

      protected void initHeader(JInterface interfaze)
    • suppressAllWarnings

      protected void suppressAllWarnings(org.codehaus.modello.model.Model objectModel, JStructure structure)
    • addModelImports

      protected void addModelImports(JClass jClass, org.codehaus.modello.model.BaseElement baseElem) throws org.codehaus.modello.ModelloException
      Throws:
      org.codehaus.modello.ModelloException
    • addModelImport

      protected void addModelImport(JClass jClass, org.codehaus.modello.model.ModelType modelType, String basePackageName)
    • getPrefix

      protected String getPrefix(JavaFieldMetadata javaFieldMetadata)
    • getDefaultValue

      protected String getDefaultValue(org.codehaus.modello.model.ModelAssociation association)
    • getJavaDefaultValue

      protected String getJavaDefaultValue(org.codehaus.modello.model.ModelField modelField) throws org.codehaus.modello.ModelloException
      Throws:
      org.codehaus.modello.ModelloException
    • getValueChecker

      protected String getValueChecker(String type, String value, org.codehaus.modello.model.ModelField field) throws org.codehaus.modello.ModelloException
      Throws:
      org.codehaus.modello.ModelloException
    • getClasses

      protected List<org.codehaus.modello.model.ModelClass> getClasses(org.codehaus.modello.model.Model model)
    • isRelevant

      protected boolean isRelevant(org.codehaus.modello.model.ModelClass modelClass)
    • isJavaEnabled

      protected boolean isJavaEnabled(org.codehaus.modello.model.ModelClass modelClass)
    • isTrackingSupport

      protected boolean isTrackingSupport(org.codehaus.modello.model.ModelClass modelClass)