public class UmlOperation extends AbstractUmlObject
Modifier and Type | Class and Description |
---|---|
static class |
UmlOperation.Data
Data from the UML model repository specific to
UmlOperation . |
static class |
UmlOperation.ReturnKind |
Modifier and Type | Field and Description |
---|---|
private UmlClass |
_containingClass |
private UmlOperation.Data |
_data |
private java.util.List<UmlClass> |
_exceptions |
private static org.apache.log4j.Logger |
_logger |
private java.util.List<UmlParameter> |
_parameters |
private UmlClass |
_returnType |
private static java.util.List<java.lang.String> |
CIM_TAGS
CIM should have no operations, but in case it does, throws tag is legal.
|
private static java.util.List<java.lang.String> |
IEC61850_TAGS
Allowed tags for IEC 61850 operations.
|
static java.util.List<java.lang.String> |
STEREOTYPES
Allowed stereotypes for UML operations.
|
static java.lang.String |
THROWS_TAG
Exceptions in EA must be specified as tagged value with the tag name 'throws'.
|
CLASS_SEPARATOR, NULL_OBJ_NAME, PACKAGE_SEPARATOR
Constructor and Description |
---|
UmlOperation(UmlClass containingClass,
UmlClass returnType,
UmlObjectData objData,
UmlOperation.Data data)
Intended to be called by
UmlClass and tests only. |
Modifier and Type | Method and Description |
---|---|
UmlClass |
addException(UmlClass exc)
Adds non-null class
exc to this operation, and returns the same object. |
UmlParameter |
addParameter(UmlParameter par)
Adds non-null parameter
par to this operation, and returns the same object. |
(package private) static UmlOperation |
basic(UmlClass containingClass,
UmlClass returnType,
java.lang.String name)
Constructs minimal operation - useful for testing.
|
UmlClass |
getContainingClass() |
java.lang.String |
getEaExceptionTypeInfo(int i) |
int |
getEaReturnTypeId() |
java.lang.String |
getEaReturnTypeInfo()
Returns known (string) info from EA; useful to display in case the return type of this
operation in EA model is not a valid UML class, so the model can be corrected.
|
java.lang.String |
getEaReturnTypeName() |
java.util.Set<UmlClass> |
getEfferentClasses()
Returns all classes that I use as type for return value, parameter or exception.
|
java.util.List<UmlClass> |
getExceptions()
Returns all exceptions declared for this operation.
|
java.lang.String |
getExceptionsSignature()
Returns potentially empty string containing comma-separated list of exceptions that follow
the 'throw' statement in operation signature.
|
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 operations.
|
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.util.List<UmlParameter> |
getParameters()
Returns all parameters of this operation.
|
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 |
getReturnType()
Returns return type of this operation, null if kind is
UmlOperation.ReturnKind.OP_RET_VOID . |
java.lang.String |
getSignature()
E.g.
|
boolean |
isAbstract() |
private boolean |
isArrayReturned() |
boolean |
isFinal() |
boolean |
isInformative()
Returns whether this UML object is informative (and thus should be ignored when generating
official IEC documents).
|
boolean |
isStatic() |
boolean |
isVoidReturned() |
java.lang.String |
toString() |
addTaggedValue, classifyPerScope, classifyPerScopePerTag, classifyPerTag, collectDuplicateDescriptions, collectDuplicateNames, collectForScope, collectNames, collectQNames, findWithSameUuidAndLog, getAlias, getDescription, getHtmlDescription, getId, getName, 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
public static final java.lang.String THROWS_TAG
private static final java.util.List<java.lang.String> IEC61850_TAGS
private static final java.util.List<java.lang.String> CIM_TAGS
private final UmlClass _containingClass
private final UmlClass _returnType
private final UmlOperation.Data _data
private final java.util.List<UmlParameter> _parameters
private final java.util.List<UmlClass> _exceptions
UmlOperation(UmlClass containingClass, UmlClass returnType, UmlObjectData objData, UmlOperation.Data data)
UmlClass
and tests only.java.lang.IllegalArgumentException
- if returnType is null but data.kind says it does not return void, or if
containingClass
and non-null returnType
are from
different models.public static java.util.List<UmlKind> getKinds(Nature nature)
nature
- ignored in this methodstatic UmlOperation basic(UmlClass containingClass, UmlClass returnType, java.lang.String name)
public UmlClass getContainingClass()
public boolean isAbstract()
public boolean isStatic()
public boolean isFinal()
private boolean isArrayReturned()
public boolean isVoidReturned()
public int getEaReturnTypeId()
public java.lang.String getEaReturnTypeName()
public java.lang.String getEaReturnTypeInfo()
public java.lang.String getEaExceptionTypeInfo(int i)
public UmlClass getReturnType()
UmlOperation.ReturnKind.OP_RET_VOID
.public UmlParameter addParameter(UmlParameter par)
par
to this operation, and returns the same object.public java.util.List<UmlParameter> getParameters()
public UmlClass addException(UmlClass exc)
exc
to this operation, and returns the same object.public java.util.List<UmlClass> getExceptions()
public java.util.Set<UmlClass> getEfferentClasses()
public java.lang.String getExceptionsSignature()
public java.lang.String getSignature()
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()
UmlObject
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.util.Set<java.lang.String> getPredefinedTagNames()
AbstractUmlObject
This default implementation returns empty set, and should be overriden by subclasses that have something to return.
getPredefinedTagNames
in interface UmlObject
getPredefinedTagNames
in class AbstractUmlObject
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2009-2015 Tatjana (Tanja) Kostic