src/main/java/org/ucmtwine/parameter/ParameterMarshaller.java
public Object[] getValueArray(Workspace ws, DataBinder binder, ExecutionContext ctx) {
    Object[] paramArray = new Object[this.parameters.size()];

    for (int i = 0; i < this.parameters.size(); i++) {

      // inject params if needed
      IParameter p = this.parameters.get(i);

      try {

        if (p.getType() == Workspace.class) {
          paramArray[i] = ws;

        } else if (p.getType() == DataBinder.class) {
          paramArray[i] = binder;

        } else if (p.getType().isAssignableFrom(ExecutionContext.class)) {
          paramArray[i] = ctx;

        } else {
          paramArray[i] = null;
        }

      } catch (ClassCastException e) {
        SystemUtils.trace("twine", "getArgumentValue failed on parameter " + (i + 1) + ": " + e.getMessage());
      }

    }

    return paramArray;
  }
public Object[] getValueArray(Workspace ws, DataBinder binder, ExecutionContext ctx) {
    Object[] paramArray = new Object[this.parameters.size()];

    for (int i = 0; i < this.parameters.size(); i++) {

      // inject params if needed
      IParameter p = this.parameters.get(i);

      try {

        if (p.getType() == Workspace.class) {
          paramArray[i] = ws;

        } else if (p.getType() == DataBinder.class) {
          paramArray[i] = binder;

        } else if (p.getType().isAssignableFrom(ExecutionContext.class)) {
          paramArray[i] = ctx;

        } else {
          paramArray[i] = null;
        }

      } catch (ClassCastException e) {
        SystemUtils.trace("twine", "getArgumentValue failed on parameter " + (i + 1) + ": " + e.getMessage());
      }

    }

    return paramArray;
  }
public Object [ ] getValueArray ( Workspace ws , DataBinder binder , ExecutionContext ctx ) { Object [ ] paramArray = new Object [ this . parameters . size ( ) ] ; for ( int i = 0 ; i < this . parameters . size ( ) ; i ++ ) { // inject params if needed IParameter p = this . parameters . get ( i ) ; try { if ( p . getType ( ) == Workspace . class ) { paramArray [ i ] = ws ; } else if ( p . getType ( ) == DataBinder . class ) { paramArray [ i ] = binder ; } else if ( p . getType ( ) . isAssignableFrom ( ExecutionContext . class ) ) { paramArray [ i ] = ctx ; } else { paramArray [ i ] = null ; } } catch ( ClassCastException e ) { SystemUtils . trace ( "twine" , "getArgumentValue failed on parameter " + ( i + 1 ) + ": " + e . getMessage ( ) ) ; } } return paramArray ; }
Returns an array of values given a filter execution context

@param ws
The system workspace
@param binder
The current binder
@param ctx
The current execution context
@return
Returns an array of values given a filter execution context