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

Why are private/protected attributes hidden?

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.1.3
    • core-libs
    • x86
    • windows_nt



      Name: rlT66838 Date: 07/29/97


      I have to wonder why private/protected fields
      and methods are hidden in the java.lang.reflect
      package? I can access this information using
      javap -private so it is not a security issue.

      Why doesn't java.lang.reflect:
        - expose all fields and methods (including
          private and protected)
        - throw security exceptions if you try to
          get/set/invoke a private or protected
          field or method?

      Private and protected attributes are not in any
      way hidden because the classfile is completely
      documented, so why don't you allow developers
      to use java.lang.reflect to really do true
      introspection without forcing us to use javap
      or our own classfile disassemblers?

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

            apalanissunw Anand Palaniswamy (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: