org.quattor.pan.statement
Class VariableStatement

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

public abstract class VariableStatement
extends Statement

Sets a global variable to a constant or computed value.

Author:
loomis

Field Summary
protected  boolean conditional
           
protected  boolean modifiable
           
protected  java.lang.String name
           
 
Constructor Summary
protected VariableStatement(SourceRange sourceRange, java.lang.String name, boolean conditional, boolean modifiable)
          Creates a VariableStatement which assign a global variable to the result of a DML block.
 
Method Summary
static java.util.List<java.lang.String> convertLoadpathVariable(Element element)
          Convert the given element (which should be the "LOADPATH" global variable) to a list of strings.
static VariableStatement getInstance(SourceRange sourceRange, java.lang.String name, Operation dml, boolean conditional, boolean modifiable)
           
 
Methods inherited from class org.quattor.pan.statement.Statement
execute, getSourceRange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final java.lang.String name

conditional

protected final boolean conditional

modifiable

protected final boolean modifiable
Constructor Detail

VariableStatement

protected VariableStatement(SourceRange sourceRange,
                            java.lang.String name,
                            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
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

getInstance

public static VariableStatement getInstance(SourceRange sourceRange,
                                            java.lang.String name,
                                            Operation dml,
                                            boolean conditional,
                                            boolean modifiable)
                                     throws SyntaxException
Throws:
SyntaxException

convertLoadpathVariable

public static java.util.List<java.lang.String> convertLoadpathVariable(Element element)
Convert the given element (which should be the "LOADPATH" global variable) to a list of strings. The list can be used in the template loading method.

Parameters:
element - element to convert to list of string (should be "LOADPATH" global variable)


Copyright © 2011 Quattor. All Rights Reserved.