|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.quattor.pan.dml.AbstractOperation
public abstract class AbstractOperation
Abstract class which implements the Operation interface and provides some functionality common to all DML components.
| Field Summary | |
|---|---|
protected Operation[] |
ops
Array of arguments (as operations) for this operation. |
protected SourceRange |
sourceRange
Source location of this operation and its arguments. |
| Constructor Summary | |
|---|---|
AbstractOperation(SourceRange sourceRange,
Operation... operations)
Set the source location information and arguments for this operation. |
|
| Method Summary | |
|---|---|
protected Element[] |
calculateArgs(Context context)
A utility method which calls execute on each of this
operation's arguments and returns an array of the results. |
protected Term[] |
calculateTerms(Context context)
A utility method that creates a list of terms from the given arguments. |
void |
checkInvalidSelfContext()
Default implementation recursively calls this method on all of the contained operations (arguments). |
void |
checkRestrictedContext()
Default implementation recursively calls this method on all of the contained operations (arguments). |
abstract Element |
execute(Context context)
Execute this operation within the given context. |
Operation[] |
getOperations()
Allow a copy of the raw operations to be retrieved. |
SourceRange |
getSourceRange()
Retrieve the source information from this operation. |
java.lang.String |
toString()
Default string representation of an operation is the class' simple name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final SourceRange sourceRange
protected final Operation[] ops
| Constructor Detail |
|---|
public AbstractOperation(SourceRange sourceRange,
Operation... operations)
sourceRange - source location of this operation and argumentsoperations - list of arguments (as operations) for this operation| Method Detail |
|---|
public abstract Element execute(Context context)
throws EvaluationException
Operation
execute in interface Operationcontext - evaluation context for the statement
EvaluationException - if an error occurs during processing
public void checkRestrictedContext()
throws SyntaxException
checkRestrictedContext in interface OperationSyntaxException - if operation cannot appear in restricted context
public void checkInvalidSelfContext()
throws SyntaxException
checkInvalidSelfContext in interface OperationSyntaxException - if operation references SELF
protected Element[] calculateArgs(Context context)
throws EvaluationException
execute on each of this
operation's arguments and returns an array of the results.
context - evaluation context to use
EvaluationException
protected Term[] calculateTerms(Context context)
throws EvaluationException
context - evaluation context to use
EvaluationException - if any error occurs when evaluating the arguments or if the
resulting value is not a valid Termpublic SourceRange getSourceRange()
public Operation[] getOperations()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||