Package japa.parser.ast.body

Examples of japa.parser.ast.body.VariableDeclaratorId


     * @param name
     *            field name
     * @return instance of {@link FieldDeclaration}
     */
    public static FieldDeclaration createFieldDeclaration(int modifiers, Type type, String name) {
        VariableDeclaratorId id = new VariableDeclaratorId(name);
        VariableDeclarator variable = new VariableDeclarator(id);
        return createFieldDeclaration(modifiers, type, variable);
    }
View Full Code Here


     *            name
     * @return instance of {@link VariableDeclarationExpr}
     */
    public static VariableDeclarationExpr createVariableDeclarationExpr(Type type, String name) {
        List<VariableDeclarator> vars = new ArrayList<VariableDeclarator>();
        vars.add(new VariableDeclarator(new VariableDeclaratorId(name)));
        return new VariableDeclarationExpr(type, vars);
    }
View Full Code Here

    return r;
  }

  @Override
  public Node visit(VariableDeclarator _n, Object _arg) {
    VariableDeclaratorId id = cloneNodes(_n.getId(), _arg);
    Expression init = cloneNodes(_n.getInit(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    VariableDeclarator r = new VariableDeclarator(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
View Full Code Here

  @Override
  public Node visit(VariableDeclaratorId _n, Object _arg) {
    Comment comment = cloneNodes(_n.getComment(), _arg);

    VariableDeclaratorId r = new VariableDeclaratorId(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        _n.getName(), _n.getArrayCount()
    );
    r.setComment(comment);
    return r;
  }
View Full Code Here

  @Override
  public Node visit(Parameter _n, Object _arg) {
    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
View Full Code Here

 
  @Override
  public Node visit(MultiTypeParameter _n, Object _arg) {
    List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg);
    List<Type> types = visit(_n.getTypes(), _arg);
    VariableDeclaratorId id = cloneNodes(_n.getId(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    MultiTypeParameter r = new MultiTypeParameter(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        _n.getModifiers(), annotations, types, id
View Full Code Here

    return Boolean.TRUE;
  }

  @Override public Boolean visit(final VariableDeclaratorId n1, final Node arg) {
    final VariableDeclaratorId n2 = (VariableDeclaratorId) arg;

    if (n1.getArrayCount() != n2.getArrayCount()) {
      return Boolean.FALSE;
    }

    if (!objEquals(n1.getName(), n2.getName())) {
      return Boolean.FALSE;
    }

    return Boolean.TRUE;
  }
View Full Code Here

TOP

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

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.