src/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java

Print this page




 172          * @serial The {@link Descriptor} containing the metadata corresponding to
 173          * this attribute
 174          */
 175         private Descriptor attrDescriptor = validDescriptor(null);
 176 
 177         private final static String currClass = "ModelMBeanAttributeInfo";
 178 
 179         /**
 180          * Constructs a ModelMBeanAttributeInfo object with a default
 181          * descriptor. The {@link Descriptor} of the constructed
 182          * object will include fields contributed by any annotations
 183          * on the {@code Method} objects that contain the {@link
 184          * DescriptorKey} meta-annotation.
 185          *
 186          * @param name The name of the attribute.
 187          * @param description A human readable description of the attribute. Optional.
 188          * @param getter The method used for reading the attribute value.
 189          *          May be null if the property is write-only.
 190          * @param setter The method used for writing the attribute value.
 191          *          May be null if the attribute is read-only.
 192          * @exception IntrospectionException There is a consistency
 193          * problem in the definition of this attribute.
 194          *
 195          */
 196 
 197         public ModelMBeanAttributeInfo(String name,
 198                                        String description,
 199                                        Method getter,
 200                                        Method setter)
 201         throws javax.management.IntrospectionException {
 202                 super(name, description, getter, setter);
 203 
 204                 if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
 205                     MODELMBEAN_LOGGER.logp(Level.FINER,
 206                             ModelMBeanAttributeInfo.class.getName(),
 207                             "ModelMBeanAttributeInfo(" +
 208                             "String,String,Method,Method)",
 209                             "Entry", name);
 210                 }
 211 
 212                 attrDescriptor = validDescriptor(null);


 216         }
 217 
 218         /**
 219          * Constructs a ModelMBeanAttributeInfo object.  The {@link
 220          * Descriptor} of the constructed object will include fields
 221          * contributed by any annotations on the {@code Method}
 222          * objects that contain the {@link DescriptorKey}
 223          * meta-annotation.
 224          *
 225          * @param name The name of the attribute.
 226          * @param description A human readable description of the attribute. Optional.
 227          * @param getter The method used for reading the attribute value.
 228          *          May be null if the property is write-only.
 229          * @param setter The method used for writing the attribute value.
 230          *          May be null if the attribute is read-only.
 231          * @param descriptor An instance of Descriptor containing the
 232          * appropriate metadata for this instance of the Attribute. If
 233          * it is null, then a default descriptor will be created.  If
 234          * the descriptor does not contain the field "displayName" this field is added
 235          * in the descriptor with its default value.
 236          * @exception IntrospectionException There is a consistency
 237          * problem in the definition of this attribute.
 238          * @exception RuntimeOperationsException Wraps an
 239          * IllegalArgumentException. The descriptor is invalid, or descriptor
 240          * field "name" is not equal to name parameter, or descriptor field
 241          * "descriptorType" is not equal to "attribute".
 242          *
 243          */
 244 
 245         public ModelMBeanAttributeInfo(String name,
 246                                        String description,
 247                                        Method getter,
 248                                        Method setter,
 249                                        Descriptor descriptor)
 250         throws javax.management.IntrospectionException {
 251 
 252                 super(name, description, getter, setter);
 253                 // put getter and setter methods in operations list
 254                 if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
 255                     MODELMBEAN_LOGGER.logp(Level.FINER,
 256                             ModelMBeanAttributeInfo.class.getName(),




 172          * @serial The {@link Descriptor} containing the metadata corresponding to
 173          * this attribute
 174          */
 175         private Descriptor attrDescriptor = validDescriptor(null);
 176 
 177         private final static String currClass = "ModelMBeanAttributeInfo";
 178 
 179         /**
 180          * Constructs a ModelMBeanAttributeInfo object with a default
 181          * descriptor. The {@link Descriptor} of the constructed
 182          * object will include fields contributed by any annotations
 183          * on the {@code Method} objects that contain the {@link
 184          * DescriptorKey} meta-annotation.
 185          *
 186          * @param name The name of the attribute.
 187          * @param description A human readable description of the attribute. Optional.
 188          * @param getter The method used for reading the attribute value.
 189          *          May be null if the property is write-only.
 190          * @param setter The method used for writing the attribute value.
 191          *          May be null if the attribute is read-only.
 192          * @exception javax.management.IntrospectionException There is a consistency
 193          * problem in the definition of this attribute.
 194          *
 195          */
 196 
 197         public ModelMBeanAttributeInfo(String name,
 198                                        String description,
 199                                        Method getter,
 200                                        Method setter)
 201         throws javax.management.IntrospectionException {
 202                 super(name, description, getter, setter);
 203 
 204                 if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
 205                     MODELMBEAN_LOGGER.logp(Level.FINER,
 206                             ModelMBeanAttributeInfo.class.getName(),
 207                             "ModelMBeanAttributeInfo(" +
 208                             "String,String,Method,Method)",
 209                             "Entry", name);
 210                 }
 211 
 212                 attrDescriptor = validDescriptor(null);


 216         }
 217 
 218         /**
 219          * Constructs a ModelMBeanAttributeInfo object.  The {@link
 220          * Descriptor} of the constructed object will include fields
 221          * contributed by any annotations on the {@code Method}
 222          * objects that contain the {@link DescriptorKey}
 223          * meta-annotation.
 224          *
 225          * @param name The name of the attribute.
 226          * @param description A human readable description of the attribute. Optional.
 227          * @param getter The method used for reading the attribute value.
 228          *          May be null if the property is write-only.
 229          * @param setter The method used for writing the attribute value.
 230          *          May be null if the attribute is read-only.
 231          * @param descriptor An instance of Descriptor containing the
 232          * appropriate metadata for this instance of the Attribute. If
 233          * it is null, then a default descriptor will be created.  If
 234          * the descriptor does not contain the field "displayName" this field is added
 235          * in the descriptor with its default value.
 236          * @exception javax.management.IntrospectionException There is a consistency
 237          * problem in the definition of this attribute.
 238          * @exception RuntimeOperationsException Wraps an
 239          * IllegalArgumentException. The descriptor is invalid, or descriptor
 240          * field "name" is not equal to name parameter, or descriptor field
 241          * "descriptorType" is not equal to "attribute".
 242          *
 243          */
 244 
 245         public ModelMBeanAttributeInfo(String name,
 246                                        String description,
 247                                        Method getter,
 248                                        Method setter,
 249                                        Descriptor descriptor)
 250         throws javax.management.IntrospectionException {
 251 
 252                 super(name, description, getter, setter);
 253                 // put getter and setter methods in operations list
 254                 if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
 255                     MODELMBEAN_LOGGER.logp(Level.FINER,
 256                             ModelMBeanAttributeInfo.class.getName(),