org.eclipse.uml2
Interface Behavior

All Superinterfaces:
BehavioredClassifier, Class, Classifier, Element, EModelElement, EncapsulatedClassifier, EObject, NamedElement, Namespace, Notifier, PackageableElement, ParameterableElement, RedefinableElement, StructuredClassifier, TemplateableElement, Type
All Known Subinterfaces:
Activity, Interaction, ProtocolStateMachine, StateMachine

public interface Behavior
extends Class

A representation of the model object 'Behavior'. Behavior is a specification of how its context classifier changes state over time. This specification may be either a definition of possible behavior execution or emergent behavior, or a selective illustration of an interesting subset of possible executions. The latter form is typically used for capturing examples, such as a trace of a particular execution. A classifier behavior is always a definition of behavior and not an illustration. It describes the sequence of state changes an instance of a classifier may undergo in the course of its lifetime. Its precise semantics depends on the kind of classifier. For example, the classifier behavior of a collaboration represents emergent behavior of all the parts, whereas the classifier behavior of a class is just the behavior of instances of the class separated from the behaviors of any of its parts. When a behavior is associated as the method of a behavioral feature, it defines the implementation of that feature; i.e., the computation that generates the effects of the behavioral feature. As a classifier, a behavior can be specialized. Instantiating a behavior is referred to as �invocating� the behavior, an instantiated behavior is also called a behavior �execution.� A behavior may be invoked directly or its invocation may be the result of invoking the behavioral feature that specifies this behavior. A behavior can also be instantiated as an object in virtue of it being a class. The specification of a behavior can take a number of forms, as described in the subclasses of Behavior. Behavior is an abstract metaclass factoring out the commonalities of these different specification mechanisms. When a behavior is invoked, its execution receives a set of input values that are used to affect the course of execution and as a result of its execution it produces a set of output values which are returned, as specified by its parameters. The observable effects of a behavior execution may include changes of values of various objects involved in the execution, the creation and destruction of objects, generation of communications between objects, as well as an explicit set of output values.

The following features are supported:

See Also:
UML2Package.getBehavior()

Field Summary
static String copyright
           
 
Fields inherited from interface org.eclipse.uml2.NamedElement
SEPARATOR
 
Method Summary
 ParameterSet createOwnedParameterSet(EClass eClass)
          Creates a ParameterSet and appends it to the 'Owned Parameter Set' containment reference list
 Parameter createParameter(EClass eClass)
          Creates a Parameter and appends it to the 'Parameter' containment reference list
 BehavioredClassifier getContext()
          Returns the value of the 'Context' container reference.
 Parameter getFormalParameter(String unqualifiedName)
          Retrieves the Parameter with the specified name from the 'Formal Parameter' reference list
 EList getFormalParameters()
          Returns the value of the 'Formal Parameter' reference list.
 EList getOwnedMembers()
           
 ParameterSet getOwnedParameterSet(String unqualifiedName)
          Retrieves the ParameterSet with the specified name from the 'Owned Parameter Set' containment reference list
 EList getOwnedParameterSets()
          Returns the value of the 'Owned Parameter Set' containment reference list.
 EList getOwnedRules()
           
 Parameter getParameter(String unqualifiedName)
          Retrieves the Parameter with the specified name from the 'Parameter' containment reference list
 EList getParameters()
          Returns the value of the 'Parameter' containment reference list.
 Constraint getPostcondition(String unqualifiedName)
          Retrieves the Constraint with the specified name from the 'Postcondition' reference list
 EList getPostconditions()
          Returns the value of the 'Postcondition' reference list.
 Constraint getPrecondition(String unqualifiedName)
          Retrieves the Constraint with the specified name from the 'Precondition' reference list
 EList getPreconditions()
          Returns the value of the 'Precondition' reference list.
 Behavior getRedefinedBehavior(String unqualifiedName)
          Retrieves the Behavior with the specified name from the 'Redefined Behavior' reference list
 EList getRedefinedBehaviors()
          Returns the value of the 'Redefined Behavior' reference list.
 EList getRedefinedElements()
           
 Parameter getReturnResult(String unqualifiedName)
          Retrieves the Parameter with the specified name from the 'Return Result' reference list
 EList getReturnResults()
          Returns the value of the 'Return Result' reference list.
 BehavioralFeature getSpecification()
          Returns the value of the 'Specification' reference.
 boolean isReentrant()
          Returns the value of the 'Is Reentrant' attribute
 void setContext(BehavioredClassifier value)
          Sets the value of the 'Context' container reference
 void setIsReentrant(boolean value)
          Sets the value of the 'Is Reentrant' attribute
 void setSpecification(BehavioralFeature value)
          Sets the value of the 'Specification' reference
 
Methods inherited from interface org.eclipse.uml2.Class
createNestedClassifier, createOwnedOperation, createOwnedReception, getAttributes, getExtension, getExtensions, getFeatures, getGenerals, getNestedClassifier, getNestedClassifiers, getOwnedAttributes, getOwnedOperation, getOwnedOperations, getOwnedReception, getOwnedReceptions, getSuperClass, getSuperClasses, inherit, isAbstract, isActive, isMetaclass, setIsAbstract, setIsActive
 
Methods inherited from interface org.eclipse.uml2.BehavioredClassifier
createImplementation, createOwnedBehavior, createOwnedStateMachine, createOwnedTrigger, getClassifierBehavior, getClientDependencies, getImplementation, getImplementations, getImplementedInterfaces, getOwnedBehavior, getOwnedBehaviors, getOwnedElements, getOwnedStateMachine, getOwnedStateMachines, getOwnedTrigger, getOwnedTriggers, setClassifierBehavior
 
Methods inherited from interface org.eclipse.uml2.Classifier
allFeatures, allParents, conformsTo, createGeneralization, createGeneralization, createOccurrence, createOwnedUseCase, createSubstitution, general, getAttribute, getFeature, getGeneral, getGeneralizations, getInheritedMember, getInheritedMembers, getMembers, getOccurrence, getOccurrences, getOwnedUseCase, getOwnedUseCases, getPowertypeExtent, getPowertypeExtents, getRedefinedClassifier, getRedefinedClassifiers, getRepresentation, getSubstitution, getSubstitutions, getUseCase, getUseCases, getUsedInterfaces, hasVisibilityOf, inheritableMembers, inheritedMember, maySpecializeType, parents, setRepresentation, validateGeneralEqualsParents, validateInheritedMember, validateNoCyclesInGeneralization, validateSpecializeType
 
Methods inherited from interface org.eclipse.uml2.Namespace
createElementImport, createOwnedRule, createPackageImport, excludeCollisions, getElementImports, getImportedMember, getImportedMembers, getImportedPackages, getMember, getNamesOfMember, getOwnedRule, getPackageImports, importedMember, importElement, importMembers, importPackage, membersAreDistinguishable, validateImportedMemberDerived, validateMembersAreDistinguishable
 
Methods inherited from interface org.eclipse.uml2.NamedElement
allNamespaces, createNameExpression, getClientDependency, getName, getNameExpression, getNamespace, getOwner, getQualifiedName, getVisibility, isDistinguishableFrom, qualifiedName, separator, setName, setNameExpression, setVisibility, validateNoName, validateQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.TemplateableElement
createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBindings, parameterableElements, setOwnedTemplateSignature
 
Methods inherited from interface org.eclipse.uml2.Element
addKeyword, allOwnedElements, apply, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedVersion, getKeywords, getModel, getNearestPackage, getOwnedComments, getValue, hasKeyword, isApplied, isRequired, mustBeOwned, removeKeyword, setValue, unapply, 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.Type
conformsTo, createAssociation, getNamespace, getPackage
 
Methods inherited from interface org.eclipse.uml2.PackageableElement
getPackageableElement_visibility, getVisibility, setPackageableElement_visibility, setVisibility
 
Methods inherited from interface org.eclipse.uml2.ParameterableElement
getOwner, getOwningParameter, getTemplateParameter, setOwningParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.RedefinableElement
getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid
 
Methods inherited from interface org.eclipse.uml2.EncapsulatedClassifier
createOwnedPort, getOwnedPort, getOwnedPorts
 
Methods inherited from interface org.eclipse.uml2.StructuredClassifier
createOwnedAttribute, createOwnedConnector, getMembers, getOwnedAttribute, getOwnedConnector, getOwnedConnectors, getPart, getParts, getRole, getRoles
 

Field Detail

copyright

public static final String copyright

See Also:
Constant Field Values
Method Detail

isReentrant

public boolean isReentrant()
Returns the value of the 'Is Reentrant' attribute.

If the meaning of the 'Is Reentrant' attribute isn't clear, there really should be more of a description here...

Tells whether the behavior can be invoked while it is still executing from a previous invocation.

Returns:
the value of the 'Is Reentrant' attribute.
See Also:
setIsReentrant(boolean), UML2Package.getBehavior_IsReentrant()

setIsReentrant

public void setIsReentrant(boolean value)
Sets the value of the 'Is Reentrant' attribute.

Parameters:
value - the new value of the 'Is Reentrant' attribute.
See Also:
isReentrant()

getContext

public BehavioredClassifier getContext()
Returns the value of the 'Context' container reference. It is bidirectional and its opposite is 'Owned Behavior'.

If the meaning of the 'Context' reference isn't clear, there really should be more of a description here...

The classifier owning the behavior. The features of the context classifier as well as the elements visible to the context classifier are visible to the behavior.

Returns:
the value of the 'Context' container reference.
See Also:
setContext(BehavioredClassifier), UML2Package.getBehavior_Context(), BehavioredClassifier.getOwnedBehaviors()

setContext

public void setContext(BehavioredClassifier value)
Sets the value of the 'Context' container reference.

Parameters:
value - the new value of the 'Context' container reference.
See Also:
getContext()

getRedefinedBehaviors

public EList getRedefinedBehaviors()
Returns the value of the 'Redefined Behavior' reference list. The list contents are of type Behavior.

If the meaning of the 'Redefined Behavior' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Redefined Behavior' reference list.
See Also:
UML2Package.getBehavior_RedefinedBehavior()

getRedefinedBehavior

public Behavior getRedefinedBehavior(String unqualifiedName)
Retrieves the Behavior with the specified name from the 'Redefined Behavior' reference list.

Parameters:
unqualifiedName - The unqualified name of the Behavior to retrieve.
Returns:
The Behavior with the specified name, or null.
See Also:
getRedefinedBehaviors()

getSpecification

public BehavioralFeature getSpecification()
Returns the value of the 'Specification' reference. It is bidirectional and its opposite is 'Method'.

If the meaning of the 'Specification' reference isn't clear, there really should be more of a description here...

Designates a behavioral feature that the behavior implements. The behavioral feature must be owned by the classifier that owns the behavior or be inherited by it. The parameters of the behavioral feature and the implementing behavior must match. If a behavior does not have a specification, it is directly associated with a classifier (i.e., it is the behavior of the classifier as a whole).

Returns:
the value of the 'Specification' reference.
See Also:
setSpecification(BehavioralFeature), UML2Package.getBehavior_Specification(), BehavioralFeature.getMethods()

setSpecification

public void setSpecification(BehavioralFeature value)
Sets the value of the 'Specification' reference.

Parameters:
value - the new value of the 'Specification' reference.
See Also:
getSpecification()

getParameters

public EList getParameters()
Returns the value of the 'Parameter' containment reference list. The list contents are of type Parameter.

If the meaning of the 'Parameter' containment reference list isn't clear, there really should be more of a description here...

References a list of parameters to the behavior which describes the order and type of arguments that can be given when the behavior is invoked and of the values which will be returned when the behavior completes its execution. (Specializes Namespace.owned- Member.)

Returns:
the value of the 'Parameter' containment reference list.
See Also:
UML2Package.getBehavior_Parameter()

getParameter

public Parameter getParameter(String unqualifiedName)
Retrieves the Parameter with the specified name from the 'Parameter' containment reference list.

Parameters:
unqualifiedName - The unqualified name of the Parameter to retrieve.
Returns:
The Parameter with the specified name, or null.
See Also:
getParameters()

createParameter

public Parameter createParameter(EClass eClass)
Creates a Parameter and appends it to the 'Parameter' containment reference list.

Parameters:
eClass - The Ecore class of the Parameter to create.
Returns:
The new Parameter.
See Also:
getParameters()

getFormalParameters

public EList getFormalParameters()
Returns the value of the 'Formal Parameter' reference list. The list contents are of type Parameter.

If the meaning of the 'Formal Parameter' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Formal Parameter' reference list.
See Also:
UML2Package.getBehavior_FormalParameter()

getFormalParameter

public Parameter getFormalParameter(String unqualifiedName)
Retrieves the Parameter with the specified name from the 'Formal Parameter' reference list.

Parameters:
unqualifiedName - The unqualified name of the Parameter to retrieve.
Returns:
The Parameter with the specified name, or null.
See Also:
getFormalParameters()

getReturnResults

public EList getReturnResults()
Returns the value of the 'Return Result' reference list. The list contents are of type Parameter.

If the meaning of the 'Return Result' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Return Result' reference list.
See Also:
UML2Package.getBehavior_ReturnResult()

getReturnResult

public Parameter getReturnResult(String unqualifiedName)
Retrieves the Parameter with the specified name from the 'Return Result' reference list.

Parameters:
unqualifiedName - The unqualified name of the Parameter to retrieve.
Returns:
The Parameter with the specified name, or null.
See Also:
getReturnResults()

getPreconditions

public EList getPreconditions()
Returns the value of the 'Precondition' reference list. The list contents are of type Constraint.

If the meaning of the 'Precondition' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Precondition' reference list.
See Also:
UML2Package.getBehavior_Precondition()

getPrecondition

public Constraint getPrecondition(String unqualifiedName)
Retrieves the Constraint with the specified name from the 'Precondition' reference list.

Parameters:
unqualifiedName - The unqualified name of the Constraint to retrieve.
Returns:
The Constraint with the specified name, or null.
See Also:
getPreconditions()

getPostconditions

public EList getPostconditions()
Returns the value of the 'Postcondition' reference list. The list contents are of type Constraint.

If the meaning of the 'Postcondition' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Postcondition' reference list.
See Also:
UML2Package.getBehavior_Postcondition()

getPostcondition

public Constraint getPostcondition(String unqualifiedName)
Retrieves the Constraint with the specified name from the 'Postcondition' reference list.

Parameters:
unqualifiedName - The unqualified name of the Constraint to retrieve.
Returns:
The Constraint with the specified name, or null.
See Also:
getPostconditions()

getOwnedParameterSets

public EList getOwnedParameterSets()
Returns the value of the 'Owned Parameter Set' containment reference list. The list contents are of type ParameterSet.

If the meaning of the 'Owned Parameter Set' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Owned Parameter Set' containment reference list.
See Also:
UML2Package.getBehavior_OwnedParameterSet()

getOwnedParameterSet

public ParameterSet getOwnedParameterSet(String unqualifiedName)
Retrieves the ParameterSet with the specified name from the 'Owned Parameter Set' containment reference list.

Parameters:
unqualifiedName - The unqualified name of the ParameterSet to retrieve.
Returns:
The ParameterSet with the specified name, or null.
See Also:
getOwnedParameterSets()

createOwnedParameterSet

public ParameterSet createOwnedParameterSet(EClass eClass)
Creates a ParameterSet and appends it to the 'Owned Parameter Set' containment reference list.

Parameters:
eClass - The Ecore class of the ParameterSet to create.
Returns:
The new ParameterSet.
See Also:
getOwnedParameterSets()

getRedefinedElements

public EList getRedefinedElements()

Specified by:
getRedefinedElements in interface Classifier

getOwnedMembers

public EList getOwnedMembers()

Specified by:
getOwnedMembers in interface Class

getOwnedRules

public EList getOwnedRules()

Specified by:
getOwnedRules in interface Namespace
Returns:
the value of the 'Owned Rule' containment reference list.
See Also:
UML2Package.getNamespace_OwnedRule(), Constraint.getNamespace()

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