public class FlatVariableScope extends Object implements VariableScope
In a flat scope there is no nesting. E.g.:
Process P defines variables x,y
The FlatScope contains:
Also, P1 may refer to x, y, P1_x, P1_y, but also to P2_x, P2_y
In a flat scope, names can easily clash, but it's simple to implement (it's a Map).
In future versions we might want to implement a more refined Scope notion with nesting; in this case, P1 may refer to x, y P1_x, P1_y, but NOT to P2_x, P2_y, because P2 does not nest in P1
VariableScope.Variable| Constructor and Description |
|---|
FlatVariableScope() |
| Modifier and Type | Method and Description |
|---|---|
VariableScope.Variable |
declare(String scopeId,
String identifier,
String type) |
VariableScope.Variable |
declare(String scopeId,
String identifier,
String type,
String tags) |
Collection<VariableScope.Variable> |
getVariables(String scopeId) |
Optional<VariableScope.Variable> |
lookup(String identifier) |
public VariableScope.Variable declare(String scopeId, String identifier, String type)
declare in interface VariableScopepublic VariableScope.Variable declare(String scopeId, String identifier, String type, String tags)
declare in interface VariableScopepublic Optional<VariableScope.Variable> lookup(String identifier)
lookup in interface VariableScopepublic Collection<VariableScope.Variable> getVariables(String scopeId)
getVariables in interface VariableScopeCopyright © 2001–2021 JBoss by Red Hat. All rights reserved.