public class UmlAssociationEnd extends AbstractUmlObject
This class is more of a helper for UmlAssociation
. We make it however implement
UmlObject
to be able to use utility methods of AbstractUmlObject
, but do not
store any instance in UmlModel
- association ends are stored in associations only. Note
that after creation, several methods will return null before the containinig association gets
created with this instance as one of its ends (
UmlAssociation.UmlAssociation(UmlAssociationEnd, UmlAssociationEnd, UmlObjectData, UmlAssociation.Data)
).
The owner of this end is determined as the owner of the type of the other end, and the nature is the nature of the type of this end. Example: For association A (bRole) --- (aRole) B, if this is aRole, its owner is the owner of A (because it is needed by A), and its nature is the nature of B (because its type is B).
Modifier and Type | Class and Description |
---|---|
static class |
UmlAssociationEnd.Data
Data from the UML model repository specific to
UmlAssociationEnd . |
static class |
UmlAssociationEnd.Kind
Kind of aggregation for association end.
|
static class |
UmlAssociationEnd.Navigable
Navigability of an association end.
|
CLASS_SEPARATOR, NULL_OBJ_NAME, PACKAGE_SEPARATOR
Constructor and Description |
---|
UmlAssociationEnd(UmlClass type,
UmlObjectData objData,
UmlAssociationEnd.Data data)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
UmlAssociation |
getContainingAssociation()
Returns the association to which this end belongs.
|
UmlKind |
getKind()
Returns kind of this UML object, as assigned by the application.
|
static java.util.List<UmlKind> |
getKinds(Nature nature)
Returns all available classifications (kinds) for association ends.
|
UmlMultiplicity |
getMultiplicity() |
Namespace |
getNamespace()
Returns the namespace of this UML object, based on tagged values in the UML model and when
missing, calculated by the application.
|
Nature |
getNature()
Returns the nature of this UML object, which determines the validation rules to apply, and
sometimes document generation formats.
|
UmlAssociationEnd.Navigable |
getNavigable() |
OwningWg |
getOwner()
Returns the IEC working group owning this UML object, as calculated by the application based
on the UML model structure.
|
java.util.Set<java.lang.String> |
getPredefinedTagNames()
Returns allowed tag names, as expected to be found in the UML model.
|
java.lang.String |
getQualifiedName()
Returns the name of this UML object combined with some container-related information (e.g.,
packageName.className, or containingPackageName.packageName).
|
UmlClass |
getType()
Returns
UmlClass used as type for this association end. |
boolean |
isAggregation() |
boolean |
isAssociation() |
boolean |
isComposition() |
boolean |
isDeprecated()
Returns whether this UML object is deprecated; this may be defined directly on this object
with the stereotype
UmlStereotype.DEPRECATED , or derived (for instance, for
association ends of an association). |
boolean |
isInformative()
Returns whether this UML object is informative (and thus should be ignored when generating
official IEC documents).
|
boolean |
isNamedWithoutMultiplicity() |
boolean |
isOther() |
boolean |
isSource()
Returns whether this end is the source end of the containing association.
|
boolean |
isTarget()
Returns whether this end is the target end of the containing association.
|
java.lang.String |
toString() |
addDeprecAndInf, addTaggedValue, appendRemainingCustomStereotypes, classifyPerScope, classifyPerScopePerTag, classifyPerTag, collectDuplicateDescriptions, collectDuplicateNames, collectForScope, collectNames, collectQNames, findAllForName, findWithSameUuidAndLog, getAlias, getDescription, getHtmlDescription, getId, getName, getSince, getStereotype, getTaggedValues, getUnallowedTagNames, getUuid, getVisibility, initFromTags, saveTags, toShortString, toShortString, validateTag
public UmlAssociationEnd(UmlClass type, UmlObjectData objData, UmlAssociationEnd.Data data)
setContainingAssociation(UmlAssociation)
to correctly set reference to itself.type
- class used as type for this association end.objData
- common data for any UmlObject
.data
- data proper to UmlAssociationEnd
.public static java.util.List<UmlKind> getKinds(Nature nature)
nature
- ignored in this methodpublic UmlAssociation getContainingAssociation()
public boolean isAssociation()
public boolean isAggregation()
public boolean isComposition()
public boolean isOther()
public UmlMultiplicity getMultiplicity()
public UmlAssociationEnd.Navigable getNavigable()
public boolean isNamedWithoutMultiplicity()
public boolean isSource()
public boolean isTarget()
public OwningWg getOwner()
Before two instances of this are used to create an association, returns null.
getOwner
in interface UmlObject
getOwner
in class AbstractUmlObject
public Namespace getNamespace()
Returns own namespace initialised from tagged values if not empty. Otherwise, returns null if association end has not yet been added to its association, or association's namespace.
public Nature getNature()
UmlObject
getNature
in interface UmlObject
getNature
in class AbstractUmlObject
public boolean isInformative()
This default implementation returns true if objects steretypes include . If there are additional criteria for deriving informative status, ensure to invoke this default implementation first.
Before two instances of this are used to create an association, returns false.
Association end is considered as informative if any of the following is true:
isInformative
in interface UmlObject
isInformative
in class AbstractUmlObject
UmlObject.isInformative()
public UmlKind getKind()
UmlObject
getKind
in interface UmlObject
getKind
in class AbstractUmlObject
public java.lang.String getQualifiedName()
Returns qualified name of this association end (i.e., the type of the other association end prepended to the name).
getQualifiedName
in interface UmlObject
getQualifiedName
in class AbstractUmlObject
public boolean isDeprecated()
UmlStereotype.DEPRECATED
, or derived (for instance, for
association ends of an association).
This default implementation returns whether the stereotype string of this object contains the
string UmlStereotype.DEPRECATED
.
Association end is deprecated if its stereotype contains , or if any of these is deprecated: its type, its other end type, or the containing association.
isDeprecated
in interface UmlObject
isDeprecated
in class AbstractUmlObject
public java.util.Set<java.lang.String> getPredefinedTagNames()
UmlObject
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2009-2016 Tatjana (Tanja) Kostic