public class Variable extends Expression
Modifier and Type | Field and Description |
---|---|
static int |
index |
static String |
NAME_PREFIX |
static String |
SELF_VARIABLE_NAME |
Constructor and Description |
---|
Variable()
Ctor for Variable with automatic assignment of name (
NAME_PREFIX
+ current index [which is increased after the name has been
constructed]). |
Variable(String name) |
Modifier and Type | Method and Description |
---|---|
SchemaCall |
getLastSegmentInValue() |
String |
getName() |
Variable |
getNextOuterScope() |
SchemaCall |
getValue() |
boolean |
isSelf() |
PropertyCall |
lastPropertyCallInEffectiveValue() |
void |
prependSchemaCallToValue(SchemaCall sc)
Creates a copy of the given SchemaCall and sets it as the front of the
path that is the value of this variable, updating references accordingly.
|
static void |
reset()
Sets index to '1'.
|
void |
setName(String name) |
void |
setNextOuterScope(Variable nextOuterScope) |
void |
setValue(SchemaCall value) |
String |
toString() |
String |
toStringWithValue() |
public static int index
public static final String NAME_PREFIX
public static final String SELF_VARIABLE_NAME
public Variable()
NAME_PREFIX
+ current index
[which is increased after the name has been
constructed]).public Variable(String name)
public String getName()
public void setName(String name)
name
- the name to setpublic Variable getNextOuterScope()
public void setNextOuterScope(Variable nextOuterScope)
nextOuterScope
- the nextOuterScope to setpublic SchemaCall getValue()
public void setValue(SchemaCall value)
value
- the value to setpublic SchemaCall getLastSegmentInValue()
public PropertyCall lastPropertyCallInEffectiveValue()
null
if no
such property call was foundpublic String toString()
toString
in class Expression
public String toStringWithValue()
public boolean isSelf()
public static void reset()
public void prependSchemaCallToValue(SchemaCall sc)
sc
- Copyright © 2017. All rights reserved.