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

Interfaces should be able to support an implementation API.

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.1.5
    • Fix Version/s: None
    • Component/s: specification
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_95

      Description



      Name: gb36485 Date: 11/30/98


      Currently, java interfaces only gracefully supports
      *clients* of an interface. What about the poor soul
      who has to *implement* the interface?

      There are two user groups of a java interface.
      (1) Clients who use the services of an interface
      provider.
      (2) Developers who implement the services.

      Group (1) is served by the Public API.Group (2) should served by a different API with
      additional implementation details/requirements.
      Most of these extra details cannot currently be
      specified, such as:
      (a) Constructor arguments
      (b) static methods
      (c) static attributes
      (d) methods with package/protected access.

      For example:
      interface FlyWeight_WholeValue_Label {
         public static FlyWeight_WholeValue_Label newInstance( String label );
         public boolean equal( Object obj );
         public int hashCode();

         /** each class implementing this interface MUST
          * provide the following static attributes/methods,
          * some would be public, most would not.
          **/
         protected FlyWeight_WholeValue_Label( String label );
         static Hashtable register;
         protected void register( String label );
         private setRegister( Hashtable register );
      }

      Any derived class/interface could access 'protected'
      methods,but only the first generation class could
      access the private methods and attributes.
      (Review ID: 25780)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abuckley Alex Buckley
                Reporter:
                gbrachasunw Gilad Bracha (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: