Exemple #1
0
 private void parse(String fragment, ExpressionFactory expressionFactory) {
   Debug.logn("Parse Method Call " + fragment, this);
   this.name = fragment.substring(0, fragment.indexOf("(")).trim();
   String paramString = fragment.substring(1 + fragment.indexOf("("), fragment.lastIndexOf(")"));
   Debug.logn("-Params " + paramString, this);
   this.parseParamStrings(paramString, expressionFactory);
 }
Exemple #2
0
  protected void parseParamStrings(String paramString, ExpressionFactory expressionFactory) {
    List paramStrings = Util.tokenizeIgnoringEnclosers(paramString, ',');
    for (Iterator itr = paramStrings.iterator(); itr.hasNext(); ) {
      String nextParam = ((String) itr.next()).trim();
      if (!(nextParam.equals(""))) {
        Debug.logn("Find match for param " + nextParam, this);
        if (CallExpression.isVariable(this.context, nextParam)) {
          DNVariable v = CallExpression.getVariable(this.context, nextParam);
          parameters.add(v);
        } else if (expressionFactory.getExpression(nextParam, this.context) != null) {

          parameters.add(expressionFactory.getExpression(nextParam, this.context));
        }
      }
    }
  }