org.netbeans.modules.bpel.model.api.support
Class VisibilityScope

java.lang.Object
  extended by org.netbeans.modules.bpel.model.api.support.VisibilityScope

public class VisibilityScope
extends java.lang.Object

Describes a visibility scope for a bpel element. There are 2 different kind of visibility scope: for activities and for variables. Activities are visible inside of Scope elements. Variables are visible inside of VariableDeclarationScope elements. The visibility scope is the chain of such elements. This chain is calculated relative the certain target BPEL element and defines the containers with elements visible to the target element.

The Scopes has particular order in the chain. The first element of visibility zone is the Process. The most nested scope is at the end of the chain. ATTENTION! TODO: It necessary to check if using of this class is safe. The matter is that the scope list is cached here and can be chenged after it. So the cached value can be obsolete.

Author:
nk160297

Nested Class Summary
static class VisibilityScope.Utils
           
 
Constructor Summary
VisibilityScope(BpelEntity modelElement)
           
VisibilityScope(BpelEntity modelElement, Lookup lookup)
           
 
Method Summary
 BpelEntity getBaseModelElement()
          Returns the Bpel element relative to which the visibility scope was constructed.
 BaseScope getClosestScope()
           
 VariableDeclarationScope getClosestVarScope()
           
 java.util.List<BaseScope> getScopeChain()
           
 java.util.List<VariableDeclarationScope> getVarScopeChain()
           
 VariableDeclaration lookForVariable(java.lang.String varName)
          Looks for a variable by name in the visibility scope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisibilityScope

public VisibilityScope(BpelEntity modelElement,
                       Lookup lookup)

VisibilityScope

public VisibilityScope(BpelEntity modelElement)
Method Detail

getBaseModelElement

public BpelEntity getBaseModelElement()
Returns the Bpel element relative to which the visibility scope was constructed.


getScopeChain

public java.util.List<BaseScope> getScopeChain()

getClosestScope

public BaseScope getClosestScope()

getVarScopeChain

public java.util.List<VariableDeclarationScope> getVarScopeChain()

getClosestVarScope

public VariableDeclarationScope getClosestVarScope()

lookForVariable

public VariableDeclaration lookForVariable(java.lang.String varName)
Looks for a variable by name in the visibility scope

Parameters:
varName -
Returns:
variable or null