@Override
 public void visit(final VariableDeclarator n, final A arg) {
   visitComment(n.getComment(), arg);
   n.getId().accept(this, arg);
   if (n.getInit() != null) {
     n.getInit().accept(this, arg);
   }
 }
 @Override
 public void visit(final VariableDeclarationExpr n, final A arg) {
   visitComment(n.getComment(), arg);
   visitAnnotations(n, arg);
   n.getElementType().accept(this, arg);
   for (final VariableDeclarator v : n.getVariables()) {
     v.accept(this, arg);
   }
 }
Пример #3
0
  @Override
  public Boolean visit(final VariableDeclarator n1, final Node arg) {
    final VariableDeclarator n2 = (VariableDeclarator) arg;

    if (!nodeEquals(n1.getId(), n2.getId())) {
      return Boolean.FALSE;
    }

    if (!nodeEquals(n1.getInit(), n2.getInit())) {
      return Boolean.FALSE;
    }

    return Boolean.TRUE;
  }