Example #1
0
  public Boolean visit(ClassOrInterfaceDeclaration n1, Node arg) {
    ClassOrInterfaceDeclaration n2 = (ClassOrInterfaceDeclaration) arg;

    // javadoc are checked at CompilationUnit

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

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

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

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

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

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

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

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

    return Boolean.TRUE;
  }