Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4748243

Doclet API: isClass() s/b isOrdinaryClass()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.4.0
    • tools



      Name: eaT66865 Date: 09/16/2002


      The RootDoc.classes() and PackageDoc.allClasses() mean
      by "class" -- an interface, error, exception, or ordinary
      class.

      PackageDoc.ordinaryClasses() leaves errors and exceptions
      out (but it's not clear if it includes interfaces or not).

      Meanwhile the Doc.isClass() returns true if the item is a
      "class", but not an interface. (It's not clear whether it
      includes errors and exceptions, or not.)

      Presumably, isClass() should really be isOrdinaryClass().
      If not, it should have some other qualifier that differentiates
      it from classes() and allClasses().

      Note that since ClassDoc is a subclass of Doc, the naming of
      the isClass() API leads to situations where ClassDoc.isClass()
      returns false.

      In other words, knowing that one has a ClassDoc object, one
      must still check to see if isClass() is true, and be prepared
      for it to be false.

      ======================================================================

            dkramersunw Douglas Kramer (Inactive)
            earmstrosunw Eric Armstrong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: