cascading.operation.expression

## Class ScriptOperation

- java.lang.Object
- - cascading.operation.BaseOperation<ScriptOperation.Context>
  - - cascading.operation.expression.ScriptOperation

All Implemented Interfaces:
  DeclaresResults, Operation<ScriptOperation.Context>, Traceable, java.io.Serializable

Direct Known Subclasses:
  ExpressionOperation, ScriptFilter, ScriptFunction, ScriptTupleFunction

    public abstract class ScriptOperation
    extends BaseOperation<ScriptOperation.Context>

See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `ScriptOperation.Context`

### Field Summary

Fields
`protected java.lang.String` `block` Field expression
`protected java.lang.String[]` `parameterNames` Field parameterNames
`protected java.lang.Class[]` `parameterTypes` Field parameterTypes
`protected java.lang.Class` `returnType` returnType

### Fields inherited from class cascading.operation.BaseOperation

`fieldDeclaration, numArgs, trace`

### Fields inherited from interface cascading.operation.Operation

`ANY`

### Constructor Summary

Constructors
Constructor and Description
`ScriptOperation(int numArgs, Fields fieldDeclaration, java.lang.String block)`
`ScriptOperation(int numArgs, Fields fieldDeclaration, java.lang.String block, java.lang.Class returnType)`
`ScriptOperation(int numArgs, Fields fieldDeclaration, java.lang.String block, java.lang.Class returnType, java.lang.Class[] expectedTypes)`
`ScriptOperation(int numArgs, Fields fieldDeclaration, java.lang.String block, java.lang.Class returnType, java.lang.String[] parameterNames, java.lang.Class[] parameterTypes)`
`ScriptOperation(int numArgs, java.lang.String block, java.lang.Class returnType)`
`ScriptOperation(int numArgs, java.lang.String block, java.lang.Class returnType, java.lang.Class[] expectedTypes)`
`ScriptOperation(int numArgs, java.lang.String block, java.lang.Class returnType, java.lang.String[] parameterNames, java.lang.Class[] parameterTypes)`

### Method Summary

Methods
`boolean` `equals(java.lang.Object object)`
`protected java.lang.Object` `evaluate(ScriptOperation.Context context, TupleEntry input)` Performs the actual expression evaluation.
`java.lang.String` `getBlock()`
`protected org.codehaus.janino.ScriptEvaluator` `getEvaluator(java.lang.Class returnType, java.lang.String[] parameterNames, java.lang.Class[] parameterTypes)`
`java.lang.String[]` `getParameterNames()`
`java.lang.Class[]` `getParameterTypes()`
`java.lang.Class` `getReturnType()`
`protected java.lang.String[]` `guessParameterNames()`
`int` `hashCode()`
`void` `prepare(FlowProcess flowProcess, OperationCall<ScriptOperation.Context> operationCall)` Method prepare does nothing, and may safely be overridden.

### Methods inherited from class cascading.operation.BaseOperation

`cleanup, flush, getFieldDeclaration, getNumArgs, getTrace, isSafe, printOperationInternal, toString, toStringInternal`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### block

    protected final java.lang.String block

Field expression

#### parameterTypes

    protected java.lang.Class[] parameterTypes

Field parameterTypes

#### parameterNames

    protected java.lang.String[] parameterNames

Field parameterNames

#### returnType

    protected java.lang.Class returnType

returnType

### Constructor Detail

#### ScriptOperation

    public ScriptOperation(int numArgs,
                   Fields fieldDeclaration,
                   java.lang.String block)

#### ScriptOperation

    public ScriptOperation(int numArgs,
                   Fields fieldDeclaration,
                   java.lang.String block,
                   java.lang.Class returnType)

#### ScriptOperation

    public ScriptOperation(int numArgs,
                   Fields fieldDeclaration,
                   java.lang.String block,
                   java.lang.Class returnType,
                   java.lang.Class[] expectedTypes)

#### ScriptOperation

    public ScriptOperation(int numArgs,
                   Fields fieldDeclaration,
                   java.lang.String block,
                   java.lang.Class returnType,
                   java.lang.String[] parameterNames,
                   java.lang.Class[] parameterTypes)

#### ScriptOperation

    public ScriptOperation(int numArgs,
                   java.lang.String block,
                   java.lang.Class returnType)

#### ScriptOperation

    public ScriptOperation(int numArgs,
                   java.lang.String block,
                   java.lang.Class returnType,
                   java.lang.Class[] expectedTypes)

#### ScriptOperation

    public ScriptOperation(int numArgs,
                   java.lang.String block,
                   java.lang.Class returnType,
                   java.lang.String[] parameterNames,
                   java.lang.Class[] parameterTypes)

### Method Detail

#### getBlock

    public java.lang.String getBlock()

#### getParameterNames

    public java.lang.String[] getParameterNames()

#### guessParameterNames

    protected java.lang.String[] guessParameterNames()
                                              throws org.codehaus.commons.compiler.CompileException,
                                                     java.io.IOException

Throws:
  `org.codehaus.commons.compiler.CompileException`
  `java.io.IOException`

#### getParameterTypes

    public java.lang.Class[] getParameterTypes()

#### getEvaluator

    protected org.codehaus.janino.ScriptEvaluator getEvaluator(java.lang.Class returnType,
                                                   java.lang.String[] parameterNames,
                                                   java.lang.Class[] parameterTypes)

#### prepare

    public void prepare(FlowProcess flowProcess,
               OperationCall<ScriptOperation.Context> operationCall)

Description copied from class: `BaseOperation`
Method prepare does nothing, and may safely be overridden.

Specified by:
  `prepare` in interface `Operation<ScriptOperation.Context>`
Overrides:
  `prepare` in class `BaseOperation<ScriptOperation.Context>`

#### getReturnType

    public java.lang.Class getReturnType()

#### evaluate

    protected java.lang.Object evaluate(ScriptOperation.Context context,
                            TupleEntry input)

Performs the actual expression evaluation.

Parameters:
  `context` -
  `input` - of type TupleEntry
Returns:
  Comparable

#### equals

    public boolean equals(java.lang.Object object)

Overrides:
  `equals` in class `BaseOperation<ScriptOperation.Context>`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `BaseOperation<ScriptOperation.Context>`