Class ObjectModelAttributeImpl
- java.lang.Object
-
- org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
-
- org.nuiton.eugene.models.object.xml.ObjectModelParameterImpl
-
- org.nuiton.eugene.models.object.xml.ObjectModelAttributeImpl
-
- All Implemented Interfaces:
WithTagValuesOrStereotypes
,ObjectModelAttribute
,ObjectModelElement
,ObjectModelParameter
public class ObjectModelAttributeImpl extends ObjectModelParameterImpl implements ObjectModelAttribute
ObjectModelAttributeImpl. Created: 14 janv. 2004- Author:
- Cédric Pineau - pineau@codelutin.com Copyright Code Lutin
-
-
Field Summary
Fields Modifier and Type Field Description protected String
associationClassName
static String
ATTRIBUTE_TYPE_AGGREGATE
static String
ATTRIBUTE_TYPE_COMPOSITE
static String
ATTRIBUTE_TYPE_SHARED
static ObjectModelJavaModifier
DEFAULT_VISIBILITY
protected ObjectModelClassifier
reference
protected String
reverseAttributeName
protected int
reverseMaxMultiplicity
-
Fields inherited from class org.nuiton.eugene.models.object.xml.ObjectModelParameterImpl
defaultValue, maxMultiplicity, minMultiplicity, PROPERTY_ORDERED, type
-
Fields inherited from class org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
comments, declaringElement, documentation, modifiers, name, objectModelImpl, tagValues
-
-
Constructor Summary
Constructors Constructor Description ObjectModelAttributeImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectModelImplRef
addStereotype(ObjectModelImplRef stereotype)
ObjectModelClass
getAssociationClass()
Returns the association class associated with this association, or null if there is none.protected Set<ObjectModelModifier>
getAuthorizedModifiers()
ObjectModelClassifier
getClassifier()
Returns the classifier referenced by this attribute or null if it does not reference a model classifier.String
getName()
Returns the name of this element.ObjectModelAttribute
getReverseAttribute()
Returns the attribute used to reference this class at the other end of the association or null if this is not an association, or if it is not bi-directionnal. @ see #getClassifier()String
getReverseAttributeName()
Return attribute reserver attribute name.int
getReverseMaxMultiplicity()
max multiplicity of the reverse attributeString
getVisibility()
Returns the visibility of this attribute.boolean
hasAssociationClass()
Returns whether this association has an associated association class, ot not.boolean
isAggregate()
Returns whether this attribute is an aggregate or not.boolean
isComposite()
Returns whether this attribute is an composite or not.boolean
isFinal()
Returns whether this attribute is final or not.boolean
isNavigable()
boolean
isTransient()
void
postInit()
boolean
referenceClassifier()
Returns whether this attribute reference a model classifier or not.void
setAssociationClassName(String associationClassName)
void
setAssociationType(String associationType)
void
setFinal(boolean isFinal)
void
setNavigable(boolean navigable)
void
setReverseAttributeName(String reverseAttributeName)
void
setReverseMaxMultiplicity(int reverseMaxMultiplicity)
void
setStatic(boolean isStatic)
void
setTransient(boolean isTransient)
void
setUnique(boolean isUnique)
void
setVisibility(String visibility)
-
Methods inherited from class org.nuiton.eugene.models.object.xml.ObjectModelParameterImpl
getDefaultValue, getMaxMultiplicity, getMinMultiplicity, getType, isOrdered, isUnique, setDefaultValue, setMaxMultiplicity, setMinMultiplicity, setOrdered, setOrdering, setType, toString
-
Methods inherited from class org.nuiton.eugene.models.object.xml.ObjectModelElementImpl
addComment, addModifier, addOrRemoveModifier, addStereotype, addTagValue, addTagValue, getComments, getDeclaringElement, getDescription, getDocumentation, getModel, getSourceDocumentation, getStereotypes, getTagValue, getTagValues, hasStereotype, hasTagValue, isStatic, removeModifier, removeModifiers, removeStereotype, removeTagValue, setDeclaringElement, setDocumentation, setName, setObjectModelImpl
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuiton.eugene.models.object.ObjectModelAttribute
getType, isStatic
-
Methods inherited from interface org.nuiton.eugene.models.object.ObjectModelElement
getComments, getDeclaringElement, getDescription, getDocumentation, getSourceDocumentation
-
Methods inherited from interface org.nuiton.eugene.models.object.ObjectModelParameter
getDefaultValue, getMaxMultiplicity, getMinMultiplicity, isOrdered, isUnique
-
Methods inherited from interface org.nuiton.eugene.models.extension.tagvalue.WithTagValuesOrStereotypes
addStereotype, addTagValue, getStereotypes, getTagValue, getTagValues, hasStereotype, hasTagValue, removeStereotype, removeTagValue
-
-
-
-
Field Detail
-
ATTRIBUTE_TYPE_AGGREGATE
public static final String ATTRIBUTE_TYPE_AGGREGATE
- See Also:
- Constant Field Values
-
ATTRIBUTE_TYPE_SHARED
public static final String ATTRIBUTE_TYPE_SHARED
- See Also:
- Constant Field Values
-
ATTRIBUTE_TYPE_COMPOSITE
public static final String ATTRIBUTE_TYPE_COMPOSITE
- See Also:
- Constant Field Values
-
DEFAULT_VISIBILITY
public static final ObjectModelJavaModifier DEFAULT_VISIBILITY
-
reverseAttributeName
protected String reverseAttributeName
-
reverseMaxMultiplicity
protected int reverseMaxMultiplicity
-
reference
protected ObjectModelClassifier reference
-
associationClassName
protected String associationClassName
-
-
Method Detail
-
postInit
public void postInit()
- Overrides:
postInit
in classObjectModelParameterImpl
-
setReverseAttributeName
public void setReverseAttributeName(String reverseAttributeName)
-
setAssociationType
public void setAssociationType(String associationType)
-
setReverseMaxMultiplicity
public void setReverseMaxMultiplicity(int reverseMaxMultiplicity)
-
setVisibility
public void setVisibility(String visibility)
-
setFinal
public void setFinal(boolean isFinal)
-
setTransient
public void setTransient(boolean isTransient)
-
setStatic
public void setStatic(boolean isStatic)
- Overrides:
setStatic
in classObjectModelElementImpl
-
getAuthorizedModifiers
protected Set<ObjectModelModifier> getAuthorizedModifiers()
- Overrides:
getAuthorizedModifiers
in classObjectModelParameterImpl
-
setNavigable
public void setNavigable(boolean navigable)
-
setUnique
public void setUnique(boolean isUnique)
- Overrides:
setUnique
in classObjectModelParameterImpl
-
isAggregate
public boolean isAggregate()
Returns whether this attribute is an aggregate or not.- Specified by:
isAggregate
in interfaceObjectModelAttribute
- Returns:
- a boolean indicating whether this attribute is an aggregate or not.
-
isComposite
public boolean isComposite()
Returns whether this attribute is an composite or not.- Specified by:
isComposite
in interfaceObjectModelAttribute
- Returns:
- a boolean indicating whether this attribute is an composite or not.
-
getVisibility
public String getVisibility()
Description copied from interface:ObjectModelAttribute
Returns the visibility of this attribute. Possible values includespublic
,protected
andprivate
.- Specified by:
getVisibility
in interfaceObjectModelAttribute
- Returns:
- the visibility of this attribute.
-
setAssociationClassName
public void setAssociationClassName(String associationClassName)
-
referenceClassifier
public boolean referenceClassifier()
Returns whether this attribute reference a model classifier or not.- Specified by:
referenceClassifier
in interfaceObjectModelAttribute
- Returns:
- a boolean indicating whether this attribute reference a model classifier or not.
-
getClassifier
public ObjectModelClassifier getClassifier()
Returns the classifier referenced by this attribute or null if it does not reference a model classifier.- Specified by:
getClassifier
in interfaceObjectModelAttribute
- Returns:
- the ObjectModelClassfifier referenced by this attribute or null if it does not reference a model classifier.
-
getReverseAttribute
public ObjectModelAttribute getReverseAttribute()
Returns the attribute used to reference this class at the other end of the association or null if this is not an association, or if it is not bi-directionnal. @ see #getClassifier()- Specified by:
getReverseAttribute
in interfaceObjectModelAttribute
- Returns:
- the ObjectModelAttribute used to reference this class at the other end of the association or null if this is not an association, or if it is not bi-directionnal.
- See Also:
ObjectModelAttribute.getClassifier()
-
getReverseAttributeName
public String getReverseAttributeName()
Description copied from interface:ObjectModelAttribute
Return attribute reserver attribute name.- Specified by:
getReverseAttributeName
in interfaceObjectModelAttribute
- Returns:
- reverse attribute name or null
-
getName
public String getName()
Description copied from interface:ObjectModelElement
Returns the name of this element.- Specified by:
getName
in interfaceObjectModelElement
- Overrides:
getName
in classObjectModelElementImpl
- Returns:
- the name of this element.
-
getReverseMaxMultiplicity
public int getReverseMaxMultiplicity()
Description copied from interface:ObjectModelAttribute
max multiplicity of the reverse attribute- Specified by:
getReverseMaxMultiplicity
in interfaceObjectModelAttribute
- Returns:
- max multiplicity of the reverse attribute
-
getAssociationClass
public ObjectModelClass getAssociationClass()
Returns the association class associated with this association, or null if there is none.- Specified by:
getAssociationClass
in interfaceObjectModelAttribute
- Returns:
- a ObjectModelClass corresponding to the association class associated with this association, or null if there is none.
-
hasAssociationClass
public boolean hasAssociationClass()
Returns whether this association has an associated association class, ot not.- Specified by:
hasAssociationClass
in interfaceObjectModelAttribute
- Returns:
- a boolean indicating whether this association has an associated association class, ot not.
-
isFinal
public boolean isFinal()
Returns whether this attribute is final or not.- Specified by:
isFinal
in interfaceObjectModelAttribute
- Returns:
- a boolean indicating whether this attribute is final or not.
-
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interfaceObjectModelAttribute
- Returns:
true
if this attribute is transient.
-
isNavigable
public boolean isNavigable()
- Specified by:
isNavigable
in interfaceObjectModelAttribute
- Returns:
true
if this attribute is navigable.
-
addStereotype
public ObjectModelImplRef addStereotype(ObjectModelImplRef stereotype)
- Overrides:
addStereotype
in classObjectModelElementImpl
-
-