org.eclipse.uml2.uml
Interface Parameter

All Superinterfaces:
ConnectableElement, Element, EModelElement, EObject, MultiplicityElement, NamedElement, Notifier, ParameterableElement, TypedElement

public interface Parameter
extends ConnectableElement, MultiplicityElement

A representation of the model object 'Parameter'. A parameter is a specification of an argument used to pass information into or out of an invocation of a behavioral feature. Parameters are allowed to be treated as connectable elements. Parameters have support for streaming, exceptions, and parameter sets.

The following features are supported:

See Also:
UMLPackage.getParameter()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 ValueSpecification createDefaultValue(String name, Type type, EClass eClass)
          Creates a new ValueSpecification, with the specified 'Name', and 'Type', and sets the 'Default Value' containment reference
 String getDefault()
          Returns the value of the 'Default' attribute
 ValueSpecification getDefaultValue()
          Returns the value of the 'Default Value' containment reference
 ParameterDirectionKind getDirection()
          Returns the value of the 'Direction' attribute.
 ParameterEffectKind getEffect()
          Returns the value of the 'Effect' attribute.
 Operation getOperation()
          Returns the value of the 'Operation' reference
 ParameterSet getParameterSet(String name)
          Retrieves the first ParameterSet with the specified 'Name' from the 'Parameter Set' reference list
 ParameterSet getParameterSet(String name, boolean ignoreCase)
          Retrieves the first ParameterSet with the specified 'Name' from the 'Parameter Set' reference list
 EList getParameterSets()
          Returns the value of the 'Parameter Set' reference list.
 boolean isException()
          Returns the value of the 'Is Exception' attribute.
 boolean isSetDefault()
          Returns whether the value of the 'Default' attribute is set
 boolean isSetEffect()
          Returns whether the value of the 'Effect' attribute is set
 boolean isStream()
          Returns the value of the 'Is Stream' attribute.
 void setBooleanDefaultValue(boolean value)
           Sets the default value for this parameter to the specified Boolean value
 void setDefault(String value)
          Sets the value of the 'Default' attribute
 void setDefaultValue(ValueSpecification value)
          Sets the value of the 'Default Value' containment reference
 void setDirection(ParameterDirectionKind value)
          Sets the value of the 'Direction' attribute
 void setEffect(ParameterEffectKind value)
          Sets the value of the 'Effect' attribute
 void setIntegerDefaultValue(int value)
           Sets the default value for this parameter to the specified integer value
 void setIsException(boolean value)
          Sets the value of the 'Is Exception' attribute
 void setIsStream(boolean value)
          Sets the value of the 'Is Stream' attribute
 void setNullDefaultValue()
           Sets the default value for this parameter to the null value
 void setStringDefaultValue(String value)
           Sets the default value for this parameter to the specified string value
 void setUnlimitedNaturalDefaultValue(int value)
           Sets the default value for this parameter to the specified unlimited natural value
 void unsetDefault()
          Unsets the value of the 'Default' attribute
 void unsetEffect()
          Unsets the value of the 'Effect' attribute
 boolean validateConnectorEnd(DiagnosticChain diagnostics, Map context)
           A parameter may only be associated with a connector end within the context of a collaboration.
 boolean validateInAndOut(DiagnosticChain diagnostics, Map context)
           Only in and inout parameters may have a delete effect.
 boolean validateNotException(DiagnosticChain diagnostics, Map context)
           An input parameter cannot be an exception.
 boolean validateReentrantBehaviors(DiagnosticChain diagnostics, Map context)
           Reentrant behaviors cannot have stream parameters.
 boolean validateStreamAndException(DiagnosticChain diagnostics, Map context)
           A parameter cannot be a stream and exception at the same time.
 
Methods inherited from interface org.eclipse.uml2.uml.ConnectableElement
getEnds
 
Methods inherited from interface org.eclipse.uml2.uml.TypedElement
getType, setType
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.uml.MultiplicityElement
compatibleWith, createLowerValue, createUpperValue, getLower, getLowerValue, getUpper, getUpperValue, includesCardinality, includesMultiplicity, is, isMultivalued, isOrdered, isUnique, lowerBound, setIsOrdered, setIsUnique, setLower, setLowerValue, setUpper, setUpperValue, upperBound, validateLowerGe0, validateUpperGeLower, validateUpperGt0, validateValueSpecificationConstant, validateValueSpecificationNoSideEffects
 

Method Detail

getParameterSets

public EList getParameterSets()
Returns the value of the 'Parameter Set' reference list. The list contents are of type ParameterSet. It is bidirectional and its opposite is 'Parameter'. The parameter sets containing the parameter. See ParameterSet.

Returns:
the value of the 'Parameter Set' reference list.
See Also:
UMLPackage.getParameter_ParameterSet(), ParameterSet.getParameters()

getParameterSet

public ParameterSet getParameterSet(String name)
Retrieves the first ParameterSet with the specified 'Name' from the 'Parameter Set' reference list.

Parameters:
name - The 'Name' of the ParameterSet to retrieve, or null.
Returns:
The first ParameterSet with the specified 'Name', or null.
See Also:
Parameter.getParameterSets()

getParameterSet

public ParameterSet getParameterSet(String name,
                                    boolean ignoreCase)
Retrieves the first ParameterSet with the specified 'Name' from the 'Parameter Set' reference list.

Parameters:
name - The 'Name' of the ParameterSet to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
Returns:
The first ParameterSet with the specified 'Name', or null.
See Also:
Parameter.getParameterSets()

getOperation

public Operation getOperation()
Returns the value of the 'Operation' reference. References the Operation owning this parameter.

Returns:
the value of the 'Operation' reference.
See Also:
UMLPackage.getParameter_Operation()

getDirection

public ParameterDirectionKind getDirection()
Returns the value of the 'Direction' attribute. The default value is "in". The literals are from the enumeration ParameterDirectionKind. Indicates whether a parameter is being sent into or out of a behavioral element.

Returns:
the value of the 'Direction' attribute.
See Also:
ParameterDirectionKind, Parameter.setDirection(ParameterDirectionKind), UMLPackage.getParameter_Direction()

setDirection

public void setDirection(ParameterDirectionKind value)
Sets the value of the 'Direction' attribute.

Parameters:
value - the new value of the 'Direction' attribute.
See Also:
ParameterDirectionKind, Parameter.getDirection()

getDefault

public String getDefault()
Returns the value of the 'Default' attribute. Specifies a String that represents a value to be used when no argument is supplied for the Parameter.

Returns:
the value of the 'Default' attribute.
See Also:
Parameter.isSetDefault(), Parameter.unsetDefault(), Parameter.setDefault(String), UMLPackage.getParameter_Default()

setDefault

public void setDefault(String value)
Sets the value of the 'Default' attribute.

Parameters:
value - the new value of the 'Default' attribute.
See Also:
Parameter.isSetDefault(), Parameter.unsetDefault(), Parameter.getDefault()

unsetDefault

public void unsetDefault()
Unsets the value of the 'Default' attribute.

See Also:
Parameter.isSetDefault(), Parameter.getDefault(), Parameter.setDefault(String)

isSetDefault

public boolean isSetDefault()
Returns whether the value of the 'Default' attribute is set.

Returns:
whether the value of the 'Default' attribute is set.
See Also:
Parameter.unsetDefault(), Parameter.getDefault(), Parameter.setDefault(String)

getDefaultValue

public ValueSpecification getDefaultValue()
Returns the value of the 'Default Value' containment reference. Specifies a ValueSpecification that represents a value to be used when no argument is supplied for the Parameter.

Returns:
the value of the 'Default Value' containment reference.
See Also:
Parameter.setDefaultValue(ValueSpecification), UMLPackage.getParameter_DefaultValue()

setDefaultValue

public void setDefaultValue(ValueSpecification value)
Sets the value of the 'Default Value' containment reference.

Parameters:
value - the new value of the 'Default Value' containment reference.
See Also:
Parameter.getDefaultValue()

createDefaultValue

public ValueSpecification createDefaultValue(String name,
                                             Type type,
                                             EClass eClass)
Creates a new ValueSpecification, with the specified 'Name', and 'Type', and sets the 'Default Value' containment reference.

Parameters:
name - The 'Name' for the new ValueSpecification, or null.
type - The 'Type' for the new ValueSpecification, or null.
eClass - The Ecore class of the ValueSpecification to create.
Returns:
The new ValueSpecification.
See Also:
Parameter.getDefaultValue()

isException

public boolean isException()
Returns the value of the 'Is Exception' attribute. The default value is "false". Tells whether an output parameter may emit a value to the exclusion of the other outputs.

Returns:
the value of the 'Is Exception' attribute.
See Also:
Parameter.setIsException(boolean), UMLPackage.getParameter_IsException()

setIsException

public void setIsException(boolean value)
Sets the value of the 'Is Exception' attribute.

Parameters:
value - the new value of the 'Is Exception' attribute.
See Also:
Parameter.isException()

isStream

public boolean isStream()
Returns the value of the 'Is Stream' attribute. The default value is "false". Tells whether an input parameter may accept values while its behavior is executing, or whether an output parameter post values while the behavior is executing.

Returns:
the value of the 'Is Stream' attribute.
See Also:
Parameter.setIsStream(boolean), UMLPackage.getParameter_IsStream()

setIsStream

public void setIsStream(boolean value)
Sets the value of the 'Is Stream' attribute.

Parameters:
value - the new value of the 'Is Stream' attribute.
See Also:
Parameter.isStream()

getEffect

public ParameterEffectKind getEffect()
Returns the value of the 'Effect' attribute. The literals are from the enumeration ParameterEffectKind. Specifies the effect that the owner of the parameter has on values passed in or out of the parameter.

Returns:
the value of the 'Effect' attribute.
See Also:
ParameterEffectKind, Parameter.isSetEffect(), Parameter.unsetEffect(), Parameter.setEffect(ParameterEffectKind), UMLPackage.getParameter_Effect()

setEffect

public void setEffect(ParameterEffectKind value)
Sets the value of the 'Effect' attribute.

Parameters:
value - the new value of the 'Effect' attribute.
See Also:
ParameterEffectKind, Parameter.isSetEffect(), Parameter.unsetEffect(), Parameter.getEffect()

unsetEffect

public void unsetEffect()
Unsets the value of the 'Effect' attribute.

See Also:
Parameter.isSetEffect(), Parameter.getEffect(), Parameter.setEffect(ParameterEffectKind)

isSetEffect

public boolean isSetEffect()
Returns whether the value of the 'Effect' attribute is set.

Returns:
whether the value of the 'Effect' attribute is set.
See Also:
Parameter.unsetEffect(), Parameter.getEffect(), Parameter.setEffect(ParameterEffectKind)

validateConnectorEnd

public boolean validateConnectorEnd(DiagnosticChain diagnostics,
                                    Map context)
A parameter may only be associated with a connector end within the context of a collaboration. self.end.notEmpty() implies self.collaboration.notEmpty()


validateStreamAndException

public boolean validateStreamAndException(DiagnosticChain diagnostics,
                                          Map context)
A parameter cannot be a stream and exception at the same time. true


validateNotException

public boolean validateNotException(DiagnosticChain diagnostics,
                                    Map context)
An input parameter cannot be an exception. true


validateReentrantBehaviors

public boolean validateReentrantBehaviors(DiagnosticChain diagnostics,
                                          Map context)
Reentrant behaviors cannot have stream parameters. true


validateInAndOut

public boolean validateInAndOut(DiagnosticChain diagnostics,
                                Map context)
Only in and inout parameters may have a delete effect. Only out, inout, and return parameters may have a create effect. true


setBooleanDefaultValue

public void setBooleanDefaultValue(boolean value)
Sets the default value for this parameter to the specified Boolean value.


setIntegerDefaultValue

public void setIntegerDefaultValue(int value)
Sets the default value for this parameter to the specified integer value.


setStringDefaultValue

public void setStringDefaultValue(String value)
Sets the default value for this parameter to the specified string value.


setUnlimitedNaturalDefaultValue

public void setUnlimitedNaturalDefaultValue(int value)
Sets the default value for this parameter to the specified unlimited natural value.


setNullDefaultValue

public void setNullDefaultValue()
Sets the default value for this parameter to the null value.


Copyright 2003, 2006 IBM Corporation and others.
All Rights Reserved.