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

documentation of magic numbers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 1.4.0
    • 1.2.0
    • docs
    • beta2
    • x86
    • windows_95



      Name: tb29552 Date: 05/12/98


      This is a little documentation gripe. Mostly,
      the documentation is very helpful.

      In java.awt.image package many class constructors
      require an integer parameter called "dataType."
      SampleModel is one such class.

      The source for ComponentSampleModel has a switch
      with cases matching dataType to constants from
      java.awt.image.DataBuffer.

      Lacking source, a reader must spend considerable
      effort to guess what valid values are
      and what class, if any, defines constants for
      these.

      There is a similar problem in java.awt.Component.
      The enableEvents() method accepts a mysterious
      mask argument of type long. The documentation
      does not refer to java.awt.AWTEvent as the source
      of valid constants to use in this mask.
      (Review ID: 30204)
      ======================================================================

            sharonz Sharon Zakhour (Inactive)
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: