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

(reflect) Should provide API for reflection of packages

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P5 P5
    • None
    • 1.1, 1.2.0, 1.3.0
    • core-libs
    • Fix Understood
    • generic, x86
    • generic, windows_95

      There is a notable omission in the current reflection API: packages.
      There should be a class java.lang.reflect.Package with methods to
      access a named package, and to iterate over the contents of a package.

      This would be particularly useful inside JCK, where we are trying to verify the
      contents of the standard Java packages, making sure that misguided licencees
      do not try and add extra classes into the Java hierarchy.

      ===========================================================================
      Another request from ###@###.###:

      Is there any way to get a list of classes in a package?
      If not, what is the point of the Package class?

      A natural new package method would be:

      Class[] Package.getClasses()

      which would return a list of all the classes registered
      in the Package.

      brian.klock@eng 1998-05-08
      ==========================================================================

            Unassigned Unassigned
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: