org.quattor.pan.statement
Class ComputedVariableStatement

java.lang.Object
  extended by org.quattor.pan.statement.Statement
      extended by org.quattor.pan.statement.VariableStatement
          extended by org.quattor.pan.statement.ComputedVariableStatement
Direct Known Subclasses:
ComputedLoadpathStatement

public class ComputedVariableStatement
extends VariableStatement

Sets a global variable to a constant or computed value.

Author:
loomis

Field Summary
protected  Operation dml
           
 
Fields inherited from class org.quattor.pan.statement.VariableStatement
conditional, modifiable, name
 
Constructor Summary
protected ComputedVariableStatement(SourceRange sourceRange, java.lang.String name, Operation dml, boolean conditional, boolean modifiable)
          Creates a VariableStatement which assign a global variable to the result of a DML block.
 
Method Summary
 void execute(Context context)
          Execute this Statement within the given context.
 java.lang.String toString()
          Return a reasonable string representation of this statement.
 
Methods inherited from class org.quattor.pan.statement.VariableStatement
convertLoadpathVariable, getInstance
 
Methods inherited from class org.quattor.pan.statement.Statement
getSourceRange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dml

protected final Operation dml
Constructor Detail

ComputedVariableStatement

protected ComputedVariableStatement(SourceRange sourceRange,
                                    java.lang.String name,
                                    Operation dml,
                                    boolean conditional,
                                    boolean modifiable)
                             throws SyntaxException
Creates a VariableStatement which assign a global variable to the result of a DML block.

Parameters:
sourceRange - source location of this statement
name - name of the global variable
dml - DML block to evaluate
conditional - flag indicating if this is a conditional assignment
modifiable - flag indicating if the variable can be modified after this statement executes (i.e. final functionality)
Throws:
SyntaxException
Method Detail

execute

public void execute(Context context)
Description copied from class: Statement
Execute this Statement within the given context.

Specified by:
execute in class Statement
Parameters:
context - DML context to use for the evalution of this statement

toString

public java.lang.String toString()
Return a reasonable string representation of this statement.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this VariableStatement


Copyright © 2011 Quattor. All Rights Reserved.