org.jicengine.operation
Interface Operation

All Known Implementing Classes:
ArrayElementCompiler.ArrayConstructor, EmptyOperation, FieldValueOperation, MethodInvocationOperation, ObjectStoreOperation, ParameterlessOperation, UnexecutableOperation, VariableValueOperation

public interface Operation

An executable operation.

Author:
.timo

Method Summary
 java.lang.Object execute(Context context)
           executes the operation in a given context. objects in the context might be used in evaluation, or operation could produce more objects into the context.
 boolean needsParameter(java.lang.String name)
           So clients may query if this operation needs a particular parameter. a return value 'true' means that in order to execute this parameter, a parameter with the given name must exist in the context.
 boolean needsParameters()
          So clients may query whether this operation needs any parameters at all.
 

Method Detail

needsParameters

public boolean needsParameters()
So clients may query whether this operation needs any parameters at all.


needsParameter

public boolean needsParameter(java.lang.String name)

So clients may query if this operation needs a particular parameter. a return value 'true' means that in order to execute this parameter, a parameter with the given name must exist in the context.

if the parmeter in question is an optional parameter, a true must be returned.


execute

public java.lang.Object execute(Context context)
                         throws OperationException

executes the operation in a given context. objects in the context might be used in evaluation, or operation could produce more objects into the context.

NOTE: operations must be re-executable.

Throws:
OperationException