Examples of VariableDeclaratorId


Examples of japa.parser.ast.body.VariableDeclaratorId

    final public Parameter FormalParameter() throws ParseException {
        Modifier modifier;
        Type type;
        boolean isVarArg = false;
        VariableDeclaratorId id;
        modifier = Modifiers();
        type = Type();
        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
            case ELLIPSIS:
                jj_consume_token(ELLIPSIS);
View Full Code Here

Examples of japa.parser.ast.body.VariableDeclaratorId

     * @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

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

Examples of japa.parser.ast.body.VariableDeclaratorId

     *            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

Examples of japa.parser.ast.body.VariableDeclaratorId

    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

Examples of japa.parser.ast.body.VariableDeclaratorId

  @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

Examples of japa.parser.ast.body.VariableDeclaratorId

  @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

Examples of japa.parser.ast.body.VariableDeclaratorId

 
  @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

Examples of japa.parser.ast.body.VariableDeclaratorId

    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
Copyright © 2018 www.massapi.com. 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.