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

Define string constants for predefined Descriptor field names

XMLWordPrintable

    • b45
    • generic
    • generic

      Now that Descriptors are part of the core JMX API, and that certain Descriptor fields are automatically set by Standard MBeans and MXBeans, it would be good for there to be string constants for the names of these fields. This avoids problems caused by typos in the field names, makes it easy to find the right names through code completion, and simplifies searches through code for field use.

      The proposal is that only those field names that are meaningful to (understood by, or set by) Standard MBeans, MXBeans, or Open MBeans define constants. Other field names (e.g. "units") that have conventional meanings are not included. Otherwise there would be a very large number of field names, and the list would tend to grow considerably between releases.

      The field names are these:
      defaultValue
      immutableInfo
      interfaceClassName
      legalValues
      maxValue
      minValue
      mxbean
      openType
      originalType

      The constant names are derived mechanically from the field names, using the transformation exemplified by:
      public static final String DEFAULT_VALUE_FIELD = "defaultValue";

      The constants appear in the class javax.management.JMX.
      ###@###.### 2005-06-08 17:13:41 GMT

            emcmanus Eamonn McManus
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: