Package japa.parser.ast.body

Examples of japa.parser.ast.body.Parameter


    if (params.size() != ps.size()) {
      return false;
    }

    for (int i = 0; i < params.size(); i++) {
      Parameter p1 = params.get(i);
      Parameter p2 = ps.get(i);
      if (!matchParams(p1, p2)) {
        return false;
      }
    }
    return true;
View Full Code Here


     * @param name
     *            name of the parameter
     * @return instance of {@link Parameter}
     */
    public static Parameter createParameter(Type type, String name) {
        return new Parameter(type, new VariableDeclaratorId(name));
    }
View Full Code Here

    List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg);
    Type type_ = cloneNodes(_n.getType(), _arg);
    VariableDeclaratorId id = cloneNodes(_n.getId(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    Parameter r = new Parameter(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        _n.getModifiers(), annotations, type_, _n.isVarArgs(), id
    );
    r.setComment(comment);
    return r;
  }
View Full Code Here

    printer.print(n.getName());

    printer.print("(");
    if (n.getParameters() != null) {
      for (final Iterator<Parameter> i = n.getParameters().iterator(); i.hasNext();) {
        final Parameter p = i.next();
        p.accept(this, arg);
        if (i.hasNext()) {
          printer.print(", ");
        }
      }
    }
View Full Code Here

    printer.print(n.getName());

    printer.print("(");
    if (n.getParameters() != null) {
      for (final Iterator<Parameter> i = n.getParameters().iterator(); i.hasNext();) {
        final Parameter p = i.next();
        p.accept(this, arg);
        if (i.hasNext()) {
          printer.print(", ");
        }
      }
    }
View Full Code Here

    return Boolean.TRUE;
  }
 
  @Override public Boolean visit(final Parameter n1, final Node arg) {
    final Parameter n2 = (Parameter) arg;
    if (!nodeEquals(n1.getType(), n2.getType())) {
      return Boolean.FALSE;
    }
    return visit((BaseParameter) n1, arg);
  }
View Full Code Here

TOP

Related Classes of japa.parser.ast.body.Parameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.