code: public boolean isInstance(AnnotationType type) {
        if (type == null) {
           return false;
        } else if (this == type) {
           return true;
        } else if (type == ROOT) {
           return true;
        }
        AnnotationType parent = getParent();
        while (!parent.equals(ROOT)) {
           if (parent.equals(type)) {
              return true;
           }
           parent = parent.getParent();
        }
        return false;
     }
docs: <p>Checks if this type is an instance of another type. Type B is an instance of Type A if A == B, B is the gold
  standard version of A, or A is in B's parent tree.</p>
  
  @param type the annotation type we are checking against
  @return True if this is an instance of the given type, False otherwise