org.quattor.pan.dml.operators
Class SelfNestedListVariable

java.lang.Object
  extended by org.quattor.pan.dml.AbstractOperation
      extended by org.quattor.pan.dml.operators.ListVariable
          extended by org.quattor.pan.dml.operators.NestedListVariable
              extended by org.quattor.pan.dml.operators.SelfNestedListVariable
All Implemented Interfaces:
Operation

public class SelfNestedListVariable
extends NestedListVariable

Looks up a nested variable in the execution context. There must be at least one index (operation).

Author:
loomis

Field Summary
 
Fields inherited from class org.quattor.pan.dml.operators.ListVariable
identifier
 
Fields inherited from class org.quattor.pan.dml.AbstractOperation
ops, sourceRange
 
Constructor Summary
SelfNestedListVariable(SourceRange sourceRange, Operation... operations)
           
 
Method Summary
 void checkInvalidSelfContext()
          Default implementation recursively calls this method on all of the contained operations (arguments).
 Element execute(Context context)
          Execute this operation within the given context.
 
Methods inherited from class org.quattor.pan.dml.operators.NestedListVariable
toString
 
Methods inherited from class org.quattor.pan.dml.operators.ListVariable
getInstance, getInstance
 
Methods inherited from class org.quattor.pan.dml.AbstractOperation
calculateArgs, calculateTerms, checkRestrictedContext, getOperations, getSourceRange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SelfNestedListVariable

public SelfNestedListVariable(SourceRange sourceRange,
                              Operation... operations)
Method Detail

checkInvalidSelfContext

public void checkInvalidSelfContext()
                             throws SyntaxException
Description copied from class: AbstractOperation
Default implementation recursively calls this method on all of the contained operations (arguments). Subclasses that reference SELF should override this method and throw a SyntaxException.

Specified by:
checkInvalidSelfContext in interface Operation
Overrides:
checkInvalidSelfContext in class AbstractOperation
Throws:
SyntaxException - if operation references SELF

execute

public Element execute(Context context)
Description copied from interface: Operation
Execute this operation within the given context. If an error occurs, an EvaluationException will be thrown with the details.

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


Copyright © 2011 Quattor. All Rights Reserved.