org.codehaus.modello.model
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.
- Version:
- $Id: ModelType.java 1413 2010-02-13 21:23:01Z hboutemy $
- Author:
- Herv?? Boutemy
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 |
ModelType
public ModelType()
ModelType
public ModelType(Model model,
java.lang.String name)
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)