Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-404

Protected Component attributes methods doesn't work for custom components

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4
    • 1.5
    • wtk

    Description

      The existing protected attributes methods in Component don't allow custom components (those outside of the WTK package) to leverage attributes, because "A protected member or constructor of an object may be accessed from outside the package in which it is declared only by code that is responsible for the implementation of that object." [1]

      This ticket proposes to change the attributes methods to the following signatures:

      public <T extends Enum<T>> Object getAttribute(T key);
      public <T extends Enum<T>> Object setAttribute(T key, Object value);

      Containers will define their own attribute enum values to implement their static attribute-based methods.

      [1] http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.6.2

      Attachments

        Activity

          People

            tvolkert Todd Volkert
            tvolkert Todd Volkert
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: