public class UmlDependency extends AbstractUmlObject
Design note: We could have had two subclasses, but it would have been an overkill at this point in time.
Modifier and Type | Class and Description |
---|---|
static class |
UmlDependency.Data
Data from the UML model repository specific to
UmlDependency . |
static class |
UmlDependency.Kind
Kinds of dependencies.
|
Modifier and Type | Field and Description |
---|---|
private UmlDependency.Data |
_data |
private UmlDependency.Kind |
_kind |
private static org.apache.log4j.Logger |
_logger |
private UmlStructure |
_source |
private UmlStructure |
_target |
static java.util.List<java.lang.String> |
STEREOTYPES
Allowed stereotypes for UML dependencies.
|
CLASS_SEPARATOR, NULL_OBJ_NAME, PACKAGE_SEPARATOR
Constructor and Description |
---|
UmlDependency(UmlStructure source,
UmlStructure target,
UmlObjectData objData,
UmlDependency.Data data)
Intended to be called by
UmlStructure and tests only. |
Modifier and Type | Method and Description |
---|---|
(package private) static UmlDependency |
basic(UmlStructure source,
UmlStructure target)
Constructs minimal instance - useful for testing.
|
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 dependencies.
|
Nature |
getNature()
Returns the nature of this UML object, which determines the validation rules to apply, and
sometimes document generation formats.
|
OwningWg |
getOwner()
Returns the IEC working group owning this UML object, as calculated by the application based
on the UML model structure.
|
java.lang.String |
getQualifiedName()
Returns the name of this UML object combined with some container-related information (e.g.,
packageName.className, or containingPackageName.packageName).
|
UmlStructure |
getSource()
Returns source.
|
UmlStructure |
getTarget()
Returns target.
|
boolean |
isForPackage()
Returns true if this is dependency between packages, false if it is between classes.
|
boolean |
isInformative()
Returns whether this UML object is informative (and thus should be ignored when generating
official IEC documents).
|
boolean |
isWithinSameWg()
Returns whether source and target have the same owner.
|
java.lang.String |
toString() |
addTaggedValue, classifyPerScope, classifyPerScopePerTag, classifyPerTag, collectDuplicateDescriptions, collectDuplicateNames, collectForScope, collectNames, collectQNames, findWithSameUuidAndLog, getAlias, getDescription, getHtmlDescription, getId, getName, getPredefinedTagNames, getSince, getStereotype, getTaggedValues, getUnallowedTagNames, getUuid, getVisibility, isDeprecated, saveTags, toShortString, toShortString, validateTag
private static final org.apache.log4j.Logger _logger
public static final java.util.List<java.lang.String> STEREOTYPES
private final UmlStructure _source
private final UmlStructure _target
private final UmlDependency.Data _data
private final UmlDependency.Kind _kind
UmlDependency(UmlStructure source, UmlStructure target, UmlObjectData objData, UmlDependency.Data data)
UmlStructure
and tests only.java.lang.IllegalArgumentException
- if source
and target
are from different models, or if
source
and target
are the same object, or if the types
of source
and target
differ, or if the type of
source
and target
is not either UmlPackage
or
UmlClass
.public static java.util.List<UmlKind> getKinds(Nature nature)
nature
- ignored in this methodstatic UmlDependency basic(UmlStructure source, UmlStructure target)
public UmlStructure getSource()
public UmlStructure getTarget()
public boolean isForPackage()
public boolean isWithinSameWg()
public OwningWg getOwner()
UmlObject
getOwner
in interface UmlObject
getOwner
in class AbstractUmlObject
public Nature getNature()
UmlObject
getNature
in interface UmlObject
getNature
in class AbstractUmlObject
public boolean isInformative()
Dependency is never informative, and this method always returns false.
isInformative
in interface UmlObject
isInformative
in class AbstractUmlObject
public UmlKind getKind()
UmlObject
getKind
in interface UmlObject
getKind
in class AbstractUmlObject
public java.lang.String getQualifiedName()
UmlObject
getQualifiedName
in interface UmlObject
getQualifiedName
in class AbstractUmlObject
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2009-2015 Tatjana (Tanja) Kostic