Class ModelType

java.lang.Object
org.codehaus.modello.model.BaseElement
org.codehaus.modello.model.ModelType
Direct Known Subclasses:
ModelClass, ModelInterface

public abstract class ModelType extends BaseElement
Either a model class or interface.
Author:
Hervé Boutemy
  • Constructor Details

    • ModelType

      public ModelType()
    • ModelType

      public ModelType(Model model, String name)
  • Method Details

    • getPackageName

      public String getPackageName()
    • getPackageName

      public String getPackageName(boolean withVersion, Version version)
    • setPackageName

      public void setPackageName(String packageName)
    • getModel

      public Model getModel()
    • getAllCodeSegments

      public List<CodeSegment> getAllCodeSegments()
    • getCodeSegments

      public List<CodeSegment> getCodeSegments(Version version)
    • getCodeSegments

      public List<CodeSegment> getCodeSegments(VersionRange versionRange)
    • addCodeSegment

      public void addCodeSegment(CodeSegment codeSegment)
    • getAllFields

      public abstract List<ModelField> getAllFields()
      Returns the list of all fields in this class. It does not include the fields of super classes.
      Returns:
      Returns the list of all fields in this class. It does not include the fields of super classes.
    • getAllFields

      public abstract List<ModelField> getAllFields(boolean withInheritedField)
      Returns all the fields in this class and all super classes if withInheritedField equals to true.
      Parameters:
      withInheritedField - whether inherited fields should be included.
      Returns:
      Returns all the fields in this class and all super classes.
    • getField

      public abstract ModelField getField(String type, VersionRange versionRange)
    • getFields

      public List<ModelField> getFields(Version version)
      Returns the list of all fields in this class for a specific version. It does not include the fields of super classes.
      Parameters:
      version - the specific version
      Returns:
      Returns the list of all fields in this class. It does not include the fields of super classes.
    • getAllFields

      public List<ModelField> getAllFields(Version version, boolean withInheritedField)
    • hasField

      public boolean hasField(String type, Version version)
    • getField

      public ModelField getField(String type, Version version)
    • getIdentifierFields

      public List<ModelField> getIdentifierFields(Version version)
    • initialize

      public void initialize(Model model)