src/main/java/org/ucmtwine/parameter/ParameterMarshaller.java
public int[] getFunctionDefinitionArray(int functionOffset, int maxParams, int returnType) {
    int[] definition = new int[maxParams + EXTRA_FUNC_DEF_VALUES];

    int paramCount = getParameterCount(false);
    int fullParamCount = getParameterCount(true);

    definition[0] = functionOffset;

    if (paramCount > maxParams) {
      throw new IllegalStateException("Attempted to get function definition table when supplied "
          + "max parameter count " + maxParams + " is smaller than real param count " + paramCount);
    }

    definition[1] = paramCount;

    int j = 2;

    for (int i = 0; i < fullParamCount; i++) {
      // add grammar element if it is NOT an injected type
      if ((this.parameters.get(i) instanceof InjectedParameter) == false) {
        definition[j] = this.parameters.get(i).getGrammarElementType();
        j++;
      }
    }

    // pad out unspecified param types
    for (; j < definition.length - 1; j++) {
      definition[j] = Parameter.GRAMMAR_ELEMENT_UNSPECIFIED;
    }

    // return type as last value
    definition[definition.length - 1] = returnType;

    return definition;
  }
public int[] getFunctionDefinitionArray(int functionOffset, int maxParams, int returnType) {
    int[] definition = new int[maxParams + EXTRA_FUNC_DEF_VALUES];

    int paramCount = getParameterCount(false);
    int fullParamCount = getParameterCount(true);

    definition[0] = functionOffset;

    if (paramCount > maxParams) {
      throw new IllegalStateException("Attempted to get function definition table when supplied "
          + "max parameter count " + maxParams + " is smaller than real param count " + paramCount);
    }

    definition[1] = paramCount;

    int j = 2;

    for (int i = 0; i < fullParamCount; i++) {
      // add grammar element if it is NOT an injected type
      if ((this.parameters.get(i) instanceof InjectedParameter) == false) {
        definition[j] = this.parameters.get(i).getGrammarElementType();
        j++;
      }
    }

    // pad out unspecified param types
    for (; j < definition.length - 1; j++) {
      definition[j] = Parameter.GRAMMAR_ELEMENT_UNSPECIFIED;
    }

    // return type as last value
    definition[definition.length - 1] = returnType;

    return definition;
  }
Return the m_functionDefinition compatible array.

@param maxParams
@return