|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ashridgetech.jamda.uml.ModelElement | +--com.ashridgetech.jamda.uml.Feature | +--com.ashridgetech.jamda.uml.Operation
A UML Operation, owned by a StructuredType
.
Nested Class Summary |
Nested classes inherited from class com.ashridgetech.jamda.uml.ModelElement |
ModelElement.DuplicateElementException, ModelElement.ElementListStore, ModelElement.ElementNameListStore, ModelElement.ElementNameStore, ModelElement.ElementStore, ModelElement.TaggedValue, ModelElement.UnknownElementException |
Field Summary |
Fields inherited from class com.ashridgetech.jamda.uml.Feature |
DEFAULT_OID_NAME |
Fields inherited from class com.ashridgetech.jamda.uml.ModelElement |
DUMMY_STORE |
Constructor Summary | |
protected |
Operation(ru.novosoft.uml.foundation.core.MOperation mo,
StructuredType owner)
Initialises new ClassType during loading. |
|
Operation(StructuredType owner,
java.lang.String name)
Creates new Operation belonging to a StructuredType . |
protected |
Operation(StructuredType owner,
java.lang.String name,
boolean dummy)
Creates new Operation belonging to a StructuredType . |
|
Operation(StructuredType owner,
java.lang.String name,
StandardTypeDef returnTypeDef)
Creates new Operation belonging to a StructuredType . |
|
Operation(StructuredType owner,
java.lang.String name,
Type returnType)
Creates new Operation belonging to a StructuredType . |
Method Summary | |
protected void |
add(ModelElement me)
Override the superclass method to store the return parameter separately. |
java.util.List |
addParameters(java.util.List properties,
Stereotype stereotype)
Add a Parameter to this Operation corresponding to each of a set of Property s. |
void |
checkValid()
Check whether this object is valid. |
Attribute |
getLinkedAttribute()
Get the Attribute linked with this Operation . |
StructuredType |
getOwner()
Get the owner of this Operation . |
Parameter |
getParameter(java.lang.String name)
Get the Parameter of this Operation with a given name |
java.util.List |
getParameters()
Get the Parameter s of this Operation . |
Procedure |
getProcedure()
Get the procedure for this Operation . |
Type |
getReturnType()
Get the return Type of this Operation . |
protected ModelElement.ElementStore |
getSubElementStore(java.lang.Class meClass)
Overridden to return the sub-element ModelElement.ElementStore
into which an object of the class meClass should be stored. |
boolean |
isAbstract()
Show whether this Operation is abstract. |
boolean |
isQuery()
Show whether this Operation is marked as query only. |
boolean |
isReturnMultiple()
Show whether the return Type of this Operation has multiple values. |
protected void |
load()
|
Operation |
setAbstract(boolean isAbstract)
Set whether this Operation is abstract. |
void |
setAfterProcedure(Procedure.Language language,
java.lang.String afterText)
Insert extra text after the body of the procedure of this Operation . |
void |
setBeforeProcedure(Procedure.Language language,
java.lang.String beforeText)
Insert extra text before the body of the procedure of this Operation . |
void |
setLinkedAttribute(Attribute attribute)
Set the Attribute linked with this Operation . |
void |
setProcedure(Procedure.Language language,
java.lang.String text)
Set the procedure of this Operation . |
Operation |
setQuery(boolean isQuery)
Set whether this Operation is marked as query only. |
Operation |
setStatic(boolean isStatic)
Set whether this Operation is of static scope. |
Operation |
setVisibility(StructuredType.Visibility visibility)
Set the visibility of this Operation . |
Methods inherited from class com.ashridgetech.jamda.uml.Feature |
getReaders, getVisibility, getWriters, isReadableBy, isStatic, isWritableBy, setFeatureStatic, setFeatureVisibility |
Methods inherited from class com.ashridgetech.jamda.uml.ModelElement |
addStereotype, addTaggedValue, addTaggedValue, addTaggedValues, addTaggedValuesInternal, checkInitialised, checkState, findTaggedValueCollection, getBooleanTaggedValue, getChildElements, getComment, getDescription, getDirectSource, getElement, getElementType, getFullName, getId, getModel, getName, getNsElement, getOriginalSource, getParentElement, getProperties, getStereotypes, getStringTaggedValue, getTaggedValue, getTaggedValues, getXpathContext, hasStereotype, hasTaggedValue, init, initLoad, isInitialised, load, load, loadElement, logChange, logger, logger, logLoad, logLoadWarning, logNew, logWarning, removeTaggedValue, select, setComment, setDirectSource, setTaggedValue, setTaggedValue, setTaggedValue, setTaggedValues, stereotype, tag, tagError, toString, type, type, type, xpath, xpathList |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Operation(StructuredType owner, java.lang.String name)
Operation
belonging to a StructuredType
.
owner
- the StructuredType
to which the new Operation will belong
name
- the name of the Operation
public Operation(StructuredType owner, java.lang.String name, Type returnType)
Operation
belonging to a StructuredType
.
owner
- the StructuredType
to which the new Operation will belong
name
- the name of the Operation
returnType
- the Type
returned by the new Operation
public Operation(StructuredType owner, java.lang.String name, StandardTypeDef returnTypeDef)
Operation
belonging to a StructuredType
.
owner
- the StructuredType
to which the new Operation will belong
name
- the name of the Operation
returnTypeDef
- the StandardTypeDef
defining the Type
returned by the new Operation
protected Operation(StructuredType owner, java.lang.String name, boolean dummy)
Operation
belonging to a StructuredType
.
protected Operation(ru.novosoft.uml.foundation.core.MOperation mo, StructuredType owner)
Method Detail |
public StructuredType getOwner()
Operation
.
StructuredType
to which this belongsModelElement.getParentElement()
public java.util.List getParameters()
Parameter
s of this Operation
.
Parameter
objects, in the order
in which they are defined in the model.public Parameter getParameter(java.lang.String name)
Parameter
of this Operation
with a given name
name
- the name of the required Attribute
Parameter
whose name is name
,
or null if there is no such objectpublic Type getReturnType()
Type
of this Operation
.
Type
,
or null if this Operation
has no return parameterpublic boolean isReturnMultiple()
Type
of this Operation
has multiple values.
Operation
returns multiple valuespublic Procedure getProcedure()
Operation
.
public void setProcedure(Procedure.Language language, java.lang.String text)
Operation
.
language
- the language in which the body is expressed by text
text
- the body of the procedurepublic void setBeforeProcedure(Procedure.Language language, java.lang.String beforeText)
Operation
.
A newline is also inserted between beforeText
and the existing body.
If there is no existing Procedure
, one is created.
language
- the language in which the body is expressed by text
beforeText
- the text to insert before the body of the procedurepublic void setAfterProcedure(Procedure.Language language, java.lang.String afterText)
Operation
.
A newline is also inserted between the existing body and afterText
.
If there is no existing Procedure
, one is created.
language
- the language in which the body is expressed by text
afterText
- the text to insert before the body of the procedurepublic boolean isAbstract()
Operation
is abstract.
public Operation setAbstract(boolean isAbstract)
Operation
is abstract.
isAbstract
- true if this is to be abstract
public Operation setStatic(boolean isStatic)
Operation
is of static scope.
isStatic
- true if this is to be static
public boolean isQuery()
Operation
is marked as query only.
public Operation setQuery(boolean isQuery)
Operation
is marked as query only.
isQuery
- true if this is to be query only
public Operation setVisibility(StructuredType.Visibility visibility)
Operation
.
visibility
- the Visibility
instance representing
this Operation
's visibility - must not be null
public Attribute getLinkedAttribute()
Attribute
linked with this Operation
.
Attribute
setLinkedAttribute(com.ashridgetech.jamda.uml.Attribute)
public void setLinkedAttribute(Attribute attribute)
Attribute
linked with this Operation
.
attribute
- the Attribute
to linkgetLinkedAttribute()
public java.util.List addParameters(java.util.List properties, Stereotype stereotype)
Parameter
to this Operation
corresponding to each of a set of Property
s.
The source
of each Parameter
is set to the
underlying element
of the corresponding Property
properties
- the Property
s which define the parametersstereotype
- the Stereotype
to give each new Parameter
- may be null
Parameter
spublic void checkValid() throws java.lang.IllegalStateException
checkValid
in class ModelElement
java.lang.IllegalStateException
- if a problem is foundprotected ModelElement.ElementStore getSubElementStore(java.lang.Class meClass)
ModelElement.ElementStore
into which an object of the class meClass
should be stored.
getSubElementStore
in class ModelElement
protected void load()
load
in class ModelElement
protected void add(ModelElement me)
add
in class ModelElement
me
- The ModelElement
to be added to the map
Must not be null and its name
property must not be null
java.lang.IllegalArgumentException
- if mp
already belongs to another Model
or a ModelPackage
java.lang.IllegalStateException
- if attempt to add a return parameter when one already exists
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |