org.codehaus.modello.model
Class ModelType

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

public abstract class ModelType
extends BaseElement

Either a model class or interface.

Version:
$Id: ModelType.java 1413 2010-02-13 21:23:01Z hboutemy $
Author:
Hervé Boutemy

Constructor Summary
ModelType()
           
ModelType(Model model, java.lang.String name)
           
 
Method Summary
 void addCodeSegment(CodeSegment codeSegment)
           
 java.util.List<CodeSegment> getAllCodeSegments()
           
abstract  java.util.List<ModelField> getAllFields()
          Returns the list of all fields in this class.
abstract  java.util.List<ModelField> getAllFields(boolean withInheritedField)
          Returns all the fields in this class and all super classes if withInheritedField equals to true.
 java.util.List<ModelField> getAllFields(Version version, boolean withInheritedField)
           
 java.util.List<CodeSegment> getCodeSegments(Version version)
           
 java.util.List<CodeSegment> getCodeSegments(VersionRange versionRange)
           
 ModelField getField(java.lang.String type, Version version)
           
abstract  ModelField getField(java.lang.String type, VersionRange versionRange)
           
 java.util.List<ModelField> getFields(Version version)
          Returns the list of all fields in this class for a specific version.
 java.util.List<ModelField> getIdentifierFields(Version version)
           
 Model getModel()
           
 java.lang.String getPackageName()
           
 java.lang.String getPackageName(boolean withVersion, Version version)
           
 boolean hasField(java.lang.String type, Version version)
           
 void initialize(Model model)
           
 void setPackageName(java.lang.String packageName)
           
 
Methods inherited from class org.codehaus.modello.model.BaseElement
addMetadata, equals, getAnnotations, getComment, getDeprecatedVersion, getDescription, getMetadata, getName, getVersionRange, hashCode, hasMetadata, isEmpty, setAnnotations, setComment, setDeprecatedVersion, setDescription, setName, setVersionRange, validate, validateElement, validateFieldNotEmpty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelType

public ModelType()

ModelType

public ModelType(Model model,
                 java.lang.String name)
Method Detail

getPackageName

public java.lang.String getPackageName()

getPackageName

public java.lang.String getPackageName(boolean withVersion,
                                       Version version)

setPackageName

public void setPackageName(java.lang.String packageName)

getModel

public Model getModel()

getAllCodeSegments

public java.util.List<CodeSegment> getAllCodeSegments()

getCodeSegments

public java.util.List<CodeSegment> getCodeSegments(Version version)

getCodeSegments

public java.util.List<CodeSegment> getCodeSegments(VersionRange versionRange)

addCodeSegment

public void addCodeSegment(CodeSegment codeSegment)

getAllFields

public abstract java.util.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 java.util.List<ModelField> getAllFields(boolean withInheritedField)
Returns all the fields in this class and all super classes if withInheritedField equals to true.

Returns:
Returns all the fields in this class and all super classes.

getField

public abstract ModelField getField(java.lang.String type,
                                    VersionRange versionRange)

getFields

public java.util.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.

Returns:
Returns the list of all fields in this class. It does not include the fields of super classes.

getAllFields

public java.util.List<ModelField> getAllFields(Version version,
                                               boolean withInheritedField)

hasField

public boolean hasField(java.lang.String type,
                        Version version)

getField

public ModelField getField(java.lang.String type,
                           Version version)

getIdentifierFields

public java.util.List<ModelField> getIdentifierFields(Version version)

initialize

public void initialize(Model model)


Copyright © 2001-2010 Codehaus. All Rights Reserved.