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, 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
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ScriptOperation.Context`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `block` Field expression
    `protected String[]` | `parameterNames` Field parameterNames
    `protected Class[]` | `parameterTypes` Field parameterTypes
    `protected 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, String block)`
    `ScriptOperation(int numArgs, Fields fieldDeclaration, String block, Class returnType)`
    `ScriptOperation(int numArgs, Fields fieldDeclaration, String block, Class returnType, Class[] expectedTypes)`
    `ScriptOperation(int numArgs, Fields fieldDeclaration, String block, Class returnType, String[] parameterNames, Class[] parameterTypes)`
    `ScriptOperation(int numArgs, String block, Class returnType)`
    `ScriptOperation(int numArgs, String block, Class returnType, Class[] expectedTypes)`
    `ScriptOperation(int numArgs, String block, Class returnType, String[] parameterNames, Class[] parameterTypes)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object object)`
    `protected Object` | `evaluate(ScriptOperation.Context context, TupleEntry input)` Performs the actual expression evaluation.
    `String` | `getBlock()`
    `protected org.codehaus.janino.ScriptEvaluator` | `getEvaluator(Class returnType, String[] parameterNames, Class[] parameterTypes)`
    `String[]` | `getParameterNames()`
    `Class[]` | `getParameterTypes()`
    `Class` | `getReturnType()`
    `protected 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 String block

      Field expression

    - #### parameterTypes

          protected Class[] parameterTypes

      Field parameterTypes

    - #### parameterNames

          protected String[] parameterNames

      Field parameterNames

    - #### returnType

          protected Class returnType

      returnType

  - ### Constructor Detail

    - #### ScriptOperation

          public ScriptOperation(int numArgs,
                         Fields fieldDeclaration,
                         String block)

    - #### ScriptOperation

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

    - #### ScriptOperation

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

    - #### ScriptOperation

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

    - #### ScriptOperation

          public ScriptOperation(int numArgs,
                         String block,
                         Class returnType)

    - #### ScriptOperation

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

    - #### ScriptOperation

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

  - ### Method Detail

    - #### getBlock

          public String getBlock()

    - #### getParameterNames

          public String[] getParameterNames()

    - #### guessParameterNames

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

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

    - #### getParameterTypes

          public Class[] getParameterTypes()

    - #### getEvaluator

          protected org.codehaus.janino.ScriptEvaluator getEvaluator(Class returnType,
                                                         String[] parameterNames,
                                                         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 Class getReturnType()

    - #### evaluate

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

      Performs the actual expression evaluation.
      Parameters:
        `context` -
        `input` - of type TupleEntry
      Returns:
        Comparable

    - #### equals

          public boolean equals(Object object)

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

    - #### hashCode

          public int hashCode()

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

Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.