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 |
ModelType
public ModelType()
ModelType
public ModelType(Model model,
String name)
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.
- 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.
- 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)
Copyright © 2001-2012 Codehaus. All Rights Reserved.