org.quattor.pan.dml
Class DML

java.lang.Object
  extended by org.quattor.pan.dml.AbstractOperation
      extended by org.quattor.pan.dml.DML
All Implemented Interfaces:
Operation

public class DML
extends AbstractOperation

This operation contains a list of other DML operations and acts like a procedure. When executed, a DML object just pushes all of the operations onto the operation stack.

Author:
loomis

Field Summary
 
Fields inherited from class org.quattor.pan.dml.AbstractOperation
ops, sourceRange
 
Constructor Summary
protected DML(SourceRange sourceRange, Operation... operations)
          Create new DML instance from variable list of arguments (as operations).
 
Method Summary
 Element execute(Context context)
          Execution of a DML block consists simply of executing the block's arguments in order.
static Operation getInstance(SourceRange sourceRange, Operation... operations)
          Factory method to create a new DML block, although this may return another Operation because of optimization.
 java.lang.String toString()
          String representation of a DML block is a list of the operations within braces.
 
Methods inherited from class org.quattor.pan.dml.AbstractOperation
calculateArgs, calculateTerms, checkInvalidSelfContext, checkRestrictedContext, getOperations, getSourceRange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DML

protected DML(SourceRange sourceRange,
              Operation... operations)
Create new DML instance from variable list of arguments (as operations).

Parameters:
sourceRange - source location of this operation and its arguments
operations - variable list of arguments
Method Detail

getInstance

public static Operation getInstance(SourceRange sourceRange,
                                    Operation... operations)
Factory method to create a new DML block, although this may return another Operation because of optimization.

Parameters:
sourceRange - location of this block in the source file
operations - the operations that make up this block
Returns:
optimized Operation representing DML block

execute

public Element execute(Context context)
Execution of a DML block consists simply of executing the block's arguments in order. If no arguments are run, then the value of the block is Undef.

Specified by:
execute in interface Operation
Specified by:
execute in class AbstractOperation
Parameters:
context - evaluation context for the statement
Returns:
Element produced by running operation

toString

public java.lang.String toString()
String representation of a DML block is a list of the operations within braces.

Overrides:
toString in class AbstractOperation
Returns:
string of class' simple name


Copyright © 2011 Quattor. All Rights Reserved.