Package 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.- Author:
- Hervé Boutemy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addCodeSegment(CodeSegment codeSegment)
List<CodeSegment>
getAllCodeSegments()
abstract List<ModelField>
getAllFields()
Returns the list of all fields in this class.abstract List<ModelField>
getAllFields(boolean withInheritedField)
Returns all the fields in this class and all super classes if withInheritedField equals to true.List<ModelField>
getAllFields(Version version, boolean withInheritedField)
List<CodeSegment>
getCodeSegments(Version version)
List<CodeSegment>
getCodeSegments(VersionRange versionRange)
ModelField
getField(String type, Version version)
abstract ModelField
getField(String type, VersionRange versionRange)
List<ModelField>
getFields(Version version)
Returns the list of all fields in this class for a specific version.List<ModelField>
getIdentifierFields(Version version)
Model
getModel()
String
getPackageName()
String
getPackageName(boolean withVersion, Version version)
boolean
hasField(String type, Version version)
void
initialize(Model model)
void
setPackageName(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
-
-
-
-
Method Detail
-
getPackageName
public String getPackageName()
-
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)
-
getField
public ModelField getField(String type, Version version)
-
getIdentifierFields
public List<ModelField> getIdentifierFields(Version version)
-
initialize
public void initialize(Model model)
-
-