org.eclipse.uml2.uml
Interface LoopNode

All Superinterfaces:
Action, ActivityGroup, ActivityNode, Element, EModelElement, EObject, ExecutableNode, NamedElement, Namespace, Notifier, RedefinableElement, StructuredActivityNode

public interface LoopNode
extends StructuredActivityNode

A representation of the model object 'Loop Node'. A loop node is a structured activity node that represents a loop with setup, test, and body sections.

The following features are supported:

See Also:
UMLPackage.getLoopNode()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 InputPin createLoopVariableInput(String name, Type type)
          Creates a new InputPin, with the specified 'Name', and 'Type', and appends it to the 'Loop Variable Input' containment reference list
 InputPin createLoopVariableInput(String name, Type type, EClass eClass)
          Creates a new InputPin, with the specified 'Name', and 'Type', and appends it to the 'Loop Variable Input' containment reference list
 OutputPin createResult(String name, Type type)
          Creates a new OutputPin, with the specified 'Name', and 'Type', and appends it to the 'Result' containment reference list
 OutputPin getBodyOutput(String name, Type type)
          Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Body Output' reference list
 OutputPin getBodyOutput(String name, Type type, boolean ignoreCase)
          Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Body Output' reference list
 EList getBodyOutputs()
          Returns the value of the 'Body Output' reference list.
 ExecutableNode getBodyPart(String name)
          Retrieves the first ExecutableNode with the specified 'Name' from the 'Body Part' reference list
 ExecutableNode getBodyPart(String name, boolean ignoreCase, EClass eClass)
          Retrieves the first ExecutableNode with the specified 'Name' from the 'Body Part' reference list
 EList getBodyParts()
          Returns the value of the 'Body Part' reference list.
 OutputPin getDecider()
          Returns the value of the 'Decider' reference
 OutputPin getLoopVariable(String name, Type type)
          Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Loop Variable' reference list
 OutputPin getLoopVariable(String name, Type type, boolean ignoreCase)
          Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Loop Variable' reference list
 InputPin getLoopVariableInput(String name, Type type)
          Retrieves the first InputPin with the specified 'Name', and 'Type' from the 'Loop Variable Input' containment reference list
 InputPin getLoopVariableInput(String name, Type type, boolean ignoreCase, EClass eClass, boolean createOnDemand)
          Retrieves the first InputPin with the specified 'Name', and 'Type' from the 'Loop Variable Input' containment reference list
 EList getLoopVariableInputs()
          Returns the value of the 'Loop Variable Input' containment reference list.
 EList getLoopVariables()
          Returns the value of the 'Loop Variable' reference list.
 OutputPin getResult(String name, Type type)
          Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Result' containment reference list
 OutputPin getResult(String name, Type type, boolean ignoreCase, boolean createOnDemand)
          Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Result' containment reference list
 EList getResults()
          Returns the value of the 'Result' containment reference list.
 ExecutableNode getSetupPart(String name)
          Retrieves the first ExecutableNode with the specified 'Name' from the 'Setup Part' reference list
 ExecutableNode getSetupPart(String name, boolean ignoreCase, EClass eClass)
          Retrieves the first ExecutableNode with the specified 'Name' from the 'Setup Part' reference list
 EList getSetupParts()
          Returns the value of the 'Setup Part' reference list.
 ExecutableNode getTest(String name)
          Retrieves the first ExecutableNode with the specified 'Name' from the 'Test' reference list
 ExecutableNode getTest(String name, boolean ignoreCase, EClass eClass)
          Retrieves the first ExecutableNode with the specified 'Name' from the 'Test' reference list
 EList getTests()
          Returns the value of the 'Test' reference list.
 boolean isTestedFirst()
          Returns the value of the 'Is Tested First' attribute.
 void setDecider(OutputPin value)
          Sets the value of the 'Decider' reference
 void setIsTestedFirst(boolean value)
          Sets the value of the 'Is Tested First' attribute
 boolean validateBodyOutputPins(DiagnosticChain diagnostics, Map context)
           The bodyOutput pins are output pins on actions in the body of the loop node.
 boolean validateInputEdges(DiagnosticChain diagnostics, Map context)
           Loop variable inputs must not have outgoing edges.
 boolean validateResultNoIncoming(DiagnosticChain diagnostics, Map context)
           The result output pins have no incoming edges.
 
Methods inherited from interface org.eclipse.uml2.uml.StructuredActivityNode
createEdge, createNode, createVariable, getEdge, getEdge, getEdges, getNode, getNode, getNodes, getVariable, getVariable, getVariables, isMustIsolate, setMustIsolate, validateEdges
 
Methods inherited from interface org.eclipse.uml2.uml.Action
createLocalPostcondition, createLocalPostcondition, createLocalPrecondition, createLocalPrecondition, getContext, getInput, getInput, getInputs, getLocalPostcondition, getLocalPostcondition, getLocalPostconditions, getLocalPrecondition, getLocalPrecondition, getLocalPreconditions, getOutput, getOutput, getOutputs
 
Methods inherited from interface org.eclipse.uml2.uml.ExecutableNode
createHandler, getHandlers
 
Methods inherited from interface org.eclipse.uml2.uml.ActivityNode
getActivity, getIncoming, getIncoming, getIncomings, getInGroups, getInInterruptibleRegions, getInPartition, getInPartition, getInPartitions, getInStructuredNode, getOutgoing, getOutgoing, getOutgoings, getRedefinedNode, getRedefinedNode, getRedefinedNodes, setActivity, setInStructuredNode, validateOwned, validateOwnedStructuredNode
 
Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid
 
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.Namespace
createElementImport, createElementImport, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImport, getElementImport, getElementImports, getImportedElements, getImportedMember, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMember, getMembers, getNamesOfMember, getOwnedMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRule, getOwnedRules, getPackageImport, getPackageImport, getPackageImports, importMembers, membersAreDistinguishable, validateMembersDistinguishable
 
Methods inherited from interface org.eclipse.uml2.uml.ActivityGroup
getContainedEdge, getContainedEdge, getContainedEdges, getContainedNode, getContainedNode, getContainedNodes, getInActivity, getSubgroups, getSuperGroup, setInActivity, validateGroupOwned, validateNodesAndEdges, validateNotContained
 

Method Detail

isTestedFirst

public boolean isTestedFirst()
Returns the value of the 'Is Tested First' attribute. The default value is "false". If true, the test is performed before the first execution of the body. If false, the body is executed once before the test is performed.

Returns:
the value of the 'Is Tested First' attribute.
See Also:
LoopNode.setIsTestedFirst(boolean), UMLPackage.getLoopNode_IsTestedFirst()

setIsTestedFirst

public void setIsTestedFirst(boolean value)
Sets the value of the 'Is Tested First' attribute.

Parameters:
value - the new value of the 'Is Tested First' attribute.
See Also:
LoopNode.isTestedFirst()

getBodyParts

public EList getBodyParts()
Returns the value of the 'Body Part' reference list. The list contents are of type ExecutableNode. The set of nodes and edges that perform the repetitive computations of the loop. The body section is executed as long as the test section produces a true value.

Returns:
the value of the 'Body Part' reference list.
See Also:
UMLPackage.getLoopNode_BodyPart()

getBodyPart

public ExecutableNode getBodyPart(String name)
Retrieves the first ExecutableNode with the specified 'Name' from the 'Body Part' reference list.

Parameters:
name - The 'Name' of the ExecutableNode to retrieve, or null.
Returns:
The first ExecutableNode with the specified 'Name', or null.
See Also:
LoopNode.getBodyParts()

getBodyPart

public ExecutableNode getBodyPart(String name,
                                  boolean ignoreCase,
                                  EClass eClass)
Retrieves the first ExecutableNode with the specified 'Name' from the 'Body Part' reference list.

Parameters:
name - The 'Name' of the ExecutableNode to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the ExecutableNode to retrieve, or null.
Returns:
The first ExecutableNode with the specified 'Name', or null.
See Also:
LoopNode.getBodyParts()

getSetupParts

public EList getSetupParts()
Returns the value of the 'Setup Part' reference list. The list contents are of type ExecutableNode. The set of nodes and edges that initialize values or perform other setup computations for the loop.

Returns:
the value of the 'Setup Part' reference list.
See Also:
UMLPackage.getLoopNode_SetupPart()

getSetupPart

public ExecutableNode getSetupPart(String name)
Retrieves the first ExecutableNode with the specified 'Name' from the 'Setup Part' reference list.

Parameters:
name - The 'Name' of the ExecutableNode to retrieve, or null.
Returns:
The first ExecutableNode with the specified 'Name', or null.
See Also:
LoopNode.getSetupParts()

getSetupPart

public ExecutableNode getSetupPart(String name,
                                   boolean ignoreCase,
                                   EClass eClass)
Retrieves the first ExecutableNode with the specified 'Name' from the 'Setup Part' reference list.

Parameters:
name - The 'Name' of the ExecutableNode to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the ExecutableNode to retrieve, or null.
Returns:
The first ExecutableNode with the specified 'Name', or null.
See Also:
LoopNode.getSetupParts()

getDecider

public OutputPin getDecider()
Returns the value of the 'Decider' reference. An output pin within the test fragment the value of which is examined after execution of the test to determine whether to execute the loop body.

Returns:
the value of the 'Decider' reference.
See Also:
LoopNode.setDecider(OutputPin), UMLPackage.getLoopNode_Decider()

setDecider

public void setDecider(OutputPin value)
Sets the value of the 'Decider' reference.

Parameters:
value - the new value of the 'Decider' reference.
See Also:
LoopNode.getDecider()

getTests

public EList getTests()
Returns the value of the 'Test' reference list. The list contents are of type ExecutableNode. The set of nodes, edges, and designated value that compute a Boolean value to determine if another execution of the body will be performed.

Returns:
the value of the 'Test' reference list.
See Also:
UMLPackage.getLoopNode_Test()

getTest

public ExecutableNode getTest(String name)
Retrieves the first ExecutableNode with the specified 'Name' from the 'Test' reference list.

Parameters:
name - The 'Name' of the ExecutableNode to retrieve, or null.
Returns:
The first ExecutableNode with the specified 'Name', or null.
See Also:
LoopNode.getTests()

getTest

public ExecutableNode getTest(String name,
                              boolean ignoreCase,
                              EClass eClass)
Retrieves the first ExecutableNode with the specified 'Name' from the 'Test' reference list.

Parameters:
name - The 'Name' of the ExecutableNode to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the ExecutableNode to retrieve, or null.
Returns:
The first ExecutableNode with the specified 'Name', or null.
See Also:
LoopNode.getTests()

getResults

public EList getResults()
Returns the value of the 'Result' containment reference list. The list contents are of type OutputPin. A list of output pins that constitute the data flow output of the entire loop.

Returns:
the value of the 'Result' containment reference list.
See Also:
UMLPackage.getLoopNode_Result()

createResult

public OutputPin createResult(String name,
                              Type type)
Creates a new OutputPin, with the specified 'Name', and 'Type', and appends it to the 'Result' containment reference list.

Parameters:
name - The 'Name' for the new OutputPin, or null.
type - The 'Type' for the new OutputPin, or null.
Returns:
The new OutputPin.
See Also:
LoopNode.getResults()

getResult

public OutputPin getResult(String name,
                           Type type)
Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Result' containment reference list.

Parameters:
name - The 'Name' of the OutputPin to retrieve, or null.
type - The 'Type' of the OutputPin to retrieve, or null.
Returns:
The first OutputPin with the specified 'Name', and 'Type', or null.
See Also:
LoopNode.getResults()

getResult

public OutputPin getResult(String name,
                           Type type,
                           boolean ignoreCase,
                           boolean createOnDemand)
Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Result' containment reference list.

Parameters:
name - The 'Name' of the OutputPin to retrieve, or null.
type - The 'Type' of the OutputPin to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
createOnDemand - Whether to create a OutputPin on demand if not found.
Returns:
The first OutputPin with the specified 'Name', and 'Type', or null.
See Also:
LoopNode.getResults()

getLoopVariables

public EList getLoopVariables()
Returns the value of the 'Loop Variable' reference list. The list contents are of type OutputPin. A list of output pins that hold the values of the loop variables during an execution of the loop. When the test fails, the values are movied to the result pins of the loop.

Returns:
the value of the 'Loop Variable' reference list.
See Also:
UMLPackage.getLoopNode_LoopVariable()

getLoopVariable

public OutputPin getLoopVariable(String name,
                                 Type type)
Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Loop Variable' reference list.

Parameters:
name - The 'Name' of the OutputPin to retrieve, or null.
type - The 'Type' of the OutputPin to retrieve, or null.
Returns:
The first OutputPin with the specified 'Name', and 'Type', or null.
See Also:
LoopNode.getLoopVariables()

getLoopVariable

public OutputPin getLoopVariable(String name,
                                 Type type,
                                 boolean ignoreCase)
Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Loop Variable' reference list.

Parameters:
name - The 'Name' of the OutputPin to retrieve, or null.
type - The 'Type' of the OutputPin to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
Returns:
The first OutputPin with the specified 'Name', and 'Type', or null.
See Also:
LoopNode.getLoopVariables()

getBodyOutputs

public EList getBodyOutputs()
Returns the value of the 'Body Output' reference list. The list contents are of type OutputPin. A list of output pins within the body fragment the values of which are moved to the loop variable pins after completion of execution of the body, before the next iteration of the loop begins or before the loop exits.

Returns:
the value of the 'Body Output' reference list.
See Also:
UMLPackage.getLoopNode_BodyOutput()

getBodyOutput

public OutputPin getBodyOutput(String name,
                               Type type)
Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Body Output' reference list.

Parameters:
name - The 'Name' of the OutputPin to retrieve, or null.
type - The 'Type' of the OutputPin to retrieve, or null.
Returns:
The first OutputPin with the specified 'Name', and 'Type', or null.
See Also:
LoopNode.getBodyOutputs()

getBodyOutput

public OutputPin getBodyOutput(String name,
                               Type type,
                               boolean ignoreCase)
Retrieves the first OutputPin with the specified 'Name', and 'Type' from the 'Body Output' reference list.

Parameters:
name - The 'Name' of the OutputPin to retrieve, or null.
type - The 'Type' of the OutputPin to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
Returns:
The first OutputPin with the specified 'Name', and 'Type', or null.
See Also:
LoopNode.getBodyOutputs()

getLoopVariableInputs

public EList getLoopVariableInputs()
Returns the value of the 'Loop Variable Input' containment reference list. The list contents are of type InputPin. A list of values that are moved into the loop variable pins before the first iteration of the loop.

Returns:
the value of the 'Loop Variable Input' containment reference list.
See Also:
UMLPackage.getLoopNode_LoopVariableInput()

createLoopVariableInput

public InputPin createLoopVariableInput(String name,
                                        Type type,
                                        EClass eClass)
Creates a new InputPin, with the specified 'Name', and 'Type', and appends it to the 'Loop Variable Input' containment reference list.

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

createLoopVariableInput

public InputPin createLoopVariableInput(String name,
                                        Type type)
Creates a new InputPin, with the specified 'Name', and 'Type', and appends it to the 'Loop Variable Input' containment reference list.

Parameters:
name - The 'Name' for the new InputPin, or null.
type - The 'Type' for the new InputPin, or null.
Returns:
The new InputPin.
See Also:
LoopNode.getLoopVariableInputs()

getLoopVariableInput

public InputPin getLoopVariableInput(String name,
                                     Type type)
Retrieves the first InputPin with the specified 'Name', and 'Type' from the 'Loop Variable Input' containment reference list.

Parameters:
name - The 'Name' of the InputPin to retrieve, or null.
type - The 'Type' of the InputPin to retrieve, or null.
Returns:
The first InputPin with the specified 'Name', and 'Type', or null.
See Also:
LoopNode.getLoopVariableInputs()

getLoopVariableInput

public InputPin getLoopVariableInput(String name,
                                     Type type,
                                     boolean ignoreCase,
                                     EClass eClass,
                                     boolean createOnDemand)
Retrieves the first InputPin with the specified 'Name', and 'Type' from the 'Loop Variable Input' containment reference list.

Parameters:
name - The 'Name' of the InputPin to retrieve, or null.
type - The 'Type' of the InputPin to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the InputPin to retrieve, or null.
createOnDemand - Whether to create a InputPin on demand if not found.
Returns:
The first InputPin with the specified 'Name', and 'Type', or null.
See Also:
LoopNode.getLoopVariableInputs()

validateInputEdges

public boolean validateInputEdges(DiagnosticChain diagnostics,
                                  Map context)
Loop variable inputs must not have outgoing edges. true


validateBodyOutputPins

public boolean validateBodyOutputPins(DiagnosticChain diagnostics,
                                      Map context)
The bodyOutput pins are output pins on actions in the body of the loop node. true


validateResultNoIncoming

public boolean validateResultNoIncoming(DiagnosticChain diagnostics,
                                        Map context)
The result output pins have no incoming edges. true


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