Package org.globus.rsl
Class VarRef
- java.lang.Object
-
- org.globus.rsl.Value
-
- org.globus.rsl.VarRef
-
public class VarRef extends Value
This class represents a variable reference in the RSL string. The reference can be concatinated by other values.
-
-
Field Summary
Fields Modifier and Type Field Description protected ValuedefValue-
Fields inherited from class org.globus.rsl.Value
concatValue, value
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.Stringevaluate(java.util.Map symbolTable)Evaluates the variable reference with the specified symbol table.java.lang.StringgetCompleteValue()Returns a complete string representation of this value.inthashCode()voidsetDefaultValue(Value value)Sets the default value of this reference.voidtoRSL(java.lang.StringBuffer buf, boolean explicitConcat)Produces a RSL representation of this variable reference.java.lang.StringtoString()
-
-
-
Field Detail
-
defValue
protected Value defValue
-
-
Method Detail
-
setDefaultValue
public void setDefaultValue(Value value)
Sets the default value of this reference.- Parameters:
value- the default value.
-
evaluate
public java.lang.String evaluate(java.util.Map symbolTable) throws RslEvaluationExceptionEvaluates the variable reference with the specified symbol table. The value of the reference is first looked up in the symbol table. If not found, then the default value is used. If the default value is not specified, the reference is evaluated to an empty string.- Overrides:
evaluatein classValue- Parameters:
symbolTable- the symbol table to evaluate the variabled reference against.- Returns:
- an evaluated string.
- Throws:
RslEvaluationException- If an error occured during rsl evaluation.
-
toRSL
public void toRSL(java.lang.StringBuffer buf, boolean explicitConcat)Produces a RSL representation of this variable reference.
-
getCompleteValue
public java.lang.String getCompleteValue()
Returns a complete string representation of this value.- Overrides:
getCompleteValuein classValue- Returns:
- a complete string representation of this value.
-
-