Package org.codehaus.modello.model
Class ModelInterface
- java.lang.Object
-
- org.codehaus.modello.model.BaseElement
-
- org.codehaus.modello.model.ModelType
-
- org.codehaus.modello.model.ModelInterface
-
public class ModelInterface extends ModelType
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
superInterface
-
Constructor Summary
Constructors Constructor Description ModelInterface()
ModelInterface(Model model, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ModelField>
getAllFields()
Returns the list of all fields in this class.java.util.List<ModelField>
getAllFields(boolean withInheritedField)
Returns all the fields in this class and all super classes if withInheritedField equals to true.ModelField
getField(java.lang.String type, VersionRange versionRange)
java.lang.String
getSuperInterface()
void
setSuperInterface(java.lang.String superInterface)
void
validateElement()
-
Methods inherited from class org.codehaus.modello.model.ModelType
addCodeSegment, getAllCodeSegments, getAllFields, getCodeSegments, getCodeSegments, getField, getFields, getIdentifierFields, getModel, getPackageName, getPackageName, hasField, initialize, setPackageName
-
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, validateFieldNotEmpty
-
-
-
-
Constructor Detail
-
ModelInterface
public ModelInterface()
-
ModelInterface
public ModelInterface(Model model, java.lang.String name)
-
-
Method Detail
-
setSuperInterface
public void setSuperInterface(java.lang.String superInterface)
-
getSuperInterface
public java.lang.String getSuperInterface()
-
getAllFields
public java.util.List<ModelField> getAllFields()
Returns the list of all fields in this class. It does not include the fields of super classes.- Specified by:
getAllFields
in classModelType
- 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(boolean withInheritedField)
Returns all the fields in this class and all super classes if withInheritedField equals to true.- Specified by:
getAllFields
in classModelType
- Parameters:
withInheritedField
- whether inherited fields should be included.- Returns:
- Returns all the fields in this class and all super classes.
-
getField
public ModelField getField(java.lang.String type, VersionRange versionRange)
-
validateElement
public void validateElement() throws ModelValidationException
- Specified by:
validateElement
in classBaseElement
- Throws:
ModelValidationException
-
-