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 StringassociationClassNamestatic StringATTRIBUTE_TYPE_AGGREGATEstatic StringATTRIBUTE_TYPE_COMPOSITEstatic StringATTRIBUTE_TYPE_SHAREDstatic ObjectModelJavaModifierDEFAULT_VISIBILITYprotected ObjectModelClassifierreferenceprotected StringreverseAttributeNameprotected intreverseMaxMultiplicity-
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 ObjectModelImplRefaddStereotype(ObjectModelImplRef stereotype)ObjectModelClassgetAssociationClass()Returns the association class associated with this association, or null if there is none.protected Set<ObjectModelModifier>getAuthorizedModifiers()ObjectModelClassifiergetClassifier()Returns the classifier referenced by this attribute or null if it does not reference a model classifier.StringgetName()Returns the name of this element.ObjectModelAttributegetReverseAttribute()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()StringgetReverseAttributeName()Return attribute reserver attribute name.intgetReverseMaxMultiplicity()max multiplicity of the reverse attributeStringgetVisibility()Returns the visibility of this attribute.booleanhasAssociationClass()Returns whether this association has an associated association class, ot not.booleanisAggregate()Returns whether this attribute is an aggregate or not.booleanisComposite()Returns whether this attribute is an composite or not.booleanisFinal()Returns whether this attribute is final or not.booleanisNavigable()booleanisTransient()protected voidmergeFrom(ObjectModelAttributeImpl source)voidpostInit()booleanreferenceClassifier()Returns whether this attribute reference a model classifier or not.voidsetAssociationClassName(String associationClassName)voidsetAssociationType(String associationType)voidsetFinal(boolean isFinal)voidsetNavigable(boolean navigable)voidsetReverseAttributeName(String reverseAttributeName)voidsetReverseMaxMultiplicity(int reverseMaxMultiplicity)voidsetStatic(boolean isStatic)voidsetTransient(boolean isTransient)voidsetUnique(boolean isUnique)voidsetVisibility(String visibility)-
Methods inherited from class org.nuiton.eugene.models.object.xml.ObjectModelParameterImpl
getDefaultValue, getMaxMultiplicity, getMinMultiplicity, getType, isOrdered, isUnique, mergeFrom, 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, mergeFrom, 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
-
mergeFrom
protected void mergeFrom(ObjectModelAttributeImpl source)
-
postInit
public void postInit()
- Overrides:
postInitin 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:
setStaticin classObjectModelElementImpl
-
getAuthorizedModifiers
protected Set<ObjectModelModifier> getAuthorizedModifiers()
- Overrides:
getAuthorizedModifiersin classObjectModelParameterImpl
-
setNavigable
public void setNavigable(boolean navigable)
-
setUnique
public void setUnique(boolean isUnique)
- Overrides:
setUniquein classObjectModelParameterImpl
-
isAggregate
public boolean isAggregate()
Returns whether this attribute is an aggregate or not.- Specified by:
isAggregatein 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:
isCompositein interfaceObjectModelAttribute- Returns:
- a boolean indicating whether this attribute is an composite or not.
-
getVisibility
public String getVisibility()
Description copied from interface:ObjectModelAttributeReturns the visibility of this attribute. Possible values includes public, protected and private.- Specified by:
getVisibilityin 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:
referenceClassifierin 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:
getClassifierin 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:
getReverseAttributein 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:ObjectModelAttributeReturn attribute reserver attribute name.- Specified by:
getReverseAttributeNamein interfaceObjectModelAttribute- Returns:
- reverse attribute name or null
-
getName
public String getName()
Description copied from interface:ObjectModelElementReturns the name of this element.- Specified by:
getNamein interfaceObjectModelElement- Overrides:
getNamein classObjectModelElementImpl- Returns:
- the name of this element.
-
getReverseMaxMultiplicity
public int getReverseMaxMultiplicity()
Description copied from interface:ObjectModelAttributemax multiplicity of the reverse attribute- Specified by:
getReverseMaxMultiplicityin 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:
getAssociationClassin 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:
hasAssociationClassin 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:
isFinalin interfaceObjectModelAttribute- Returns:
- a boolean indicating whether this attribute is final or not.
-
isTransient
public boolean isTransient()
- Specified by:
isTransientin interfaceObjectModelAttribute- Returns:
trueif this attribute is transient.
-
isNavigable
public boolean isNavigable()
- Specified by:
isNavigablein interfaceObjectModelAttribute- Returns:
trueif this attribute is navigable.
-
addStereotype
public ObjectModelImplRef addStereotype(ObjectModelImplRef stereotype)
- Overrides:
addStereotypein classObjectModelElementImpl
-
-