public class Scope extends Object
To support nested contexts of mixins, a parent scope can be given, which will be used to resolve unknown variables.
| Constructor and Description |
|---|
Scope()
Creates a new and empty scope without a parent scope
|
Scope(Scope scope)
Creates a new and empty scope using the given parameter as parent scope.
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
get(String name)
Returns the value previously set for the given variable.
|
boolean |
has(String name)
Determines if this scope has a value set for the given variable.
|
void |
set(String name,
Expression value)
Sets a variable in this scope.
|
public Scope()
public Scope(Scope scope)
scope - the parent scope to usepublic void set(String name, Expression value)
name - the name of the variable to setvalue - the value of the variable to setpublic Expression get(String name)
name - the variable to lookupValue with "" as content, in case the value is completely unknown.public boolean has(String name)
name - the variable to lookupCopyright © 2016. All rights reserved.