@Override
 public void visit(final AnnotationDeclaration n, final A arg) {
   visitComment(n.getComment(), arg);
   visitAnnotations(n, arg);
   n.getNameExpr().accept(this, arg);
   if (n.getMembers() != null) {
     for (final BodyDeclaration<?> member : n.getMembers()) {
       member.accept(this, arg);
     }
   }
 }
Exemplo n.º 2
0
  @Override
  public Boolean visit(final AnnotationDeclaration n1, final Node arg) {
    final AnnotationDeclaration n2 = (AnnotationDeclaration) arg;

    // javadoc are checked at CompilationUnit

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

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

    if (!nodesEquals(n1.getAnnotations(), n2.getAnnotations())) {
      return Boolean.FALSE;
    }

    if (!nodesEquals(n1.getMembers(), n2.getMembers())) {
      return Boolean.FALSE;
    }

    return Boolean.TRUE;
  }