javax.management.modelmbean
Class ModelMBeanAttributeInfo

java.lang.Object
  extended byjavax.management.MBeanFeatureInfo (src) 
      extended byjavax.management.MBeanAttributeInfo (src) 
          extended byjavax.management.modelmbean.ModelMBeanAttributeInfo
All Implemented Interfaces:
java.lang.Cloneable, DescriptorAccess (src) , java.io.Serializable

public class ModelMBeanAttributeInfo
extends MBeanAttributeInfo (src)
implements DescriptorAccess (src) , java.lang.Cloneable

Represents a Model MBean's management attribute.

See Also:
MBeanAttributeInfo (src) , Serialized Form

Field Summary
 
Fields inherited from class javax.management.MBeanFeatureInfo (src)
description, name
 
Constructor Summary
ModelMBeanAttributeInfo(ModelMBeanAttributeInfo (src)  info)
          Copy constructor.
ModelMBeanAttributeInfo(java.lang.String name, java.lang.String description, java.lang.reflect.Method getter, java.lang.reflect.Method setter)
          Creates a new attribute info with a default descriptor.
ModelMBeanAttributeInfo(java.lang.String name, java.lang.String description, java.lang.reflect.Method getter, java.lang.reflect.Method setter, Descriptor (src)  descriptor)
          Creates a new attribute info object.
ModelMBeanAttributeInfo(java.lang.String name, java.lang.String type, java.lang.String description, boolean isReadable, boolean isWritable, boolean isIs)
          Creates a new attribute info object with a default descriptor.
ModelMBeanAttributeInfo(java.lang.String name, java.lang.String type, java.lang.String description, boolean isReadable, boolean isWritable, boolean isIs, Descriptor (src)  descriptor)
          Creates a new attribute info object with a given descriptor.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this object.
 Descriptor (src) getDescriptor()
          Returns a copy of the descriptor associated with this attribute.
 void setDescriptor(Descriptor (src)  inDescriptor)
          Replaces the descriptor associated with this attribute.
 java.lang.String toString()
          Returns a string representation of this Model MBean attribute info object.
 
Methods inherited from class javax.management.MBeanAttributeInfo (src)
equals, getType, hashCode, isIs, isReadable, isWritable
 
Methods inherited from class javax.management.MBeanFeatureInfo (src)
getDescription, getName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(java.lang.String name,
                               java.lang.String description,
                               java.lang.reflect.Method getter,
                               java.lang.reflect.Method setter)
                        throws IntrospectionException (src) 
Creates a new attribute info with a default descriptor.

Parameters:
name - name of the attribute
description - human readable description string
getter - a Method instance representing a read method for this attribute
setter - a Method instance representing a write method for this attribute
Throws:
IntrospectionException (src) - if the accessor methods are not valid for this attribute

ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(java.lang.String name,
                               java.lang.String description,
                               java.lang.reflect.Method getter,
                               java.lang.reflect.Method setter,
                               Descriptor (src)  descriptor)
                        throws IntrospectionException (src) 
Creates a new attribute info object. If a null or invalid descriptor is passed as a parameter, a default descriptor will be created for the attribute.

Parameters:
name - name of the attribute
description - human readable description string
getter - a Method instance representing a read method for this attribute
setter - a Method instance representing a write method for this attribute
descriptor - a descriptor to associate with this attribute
Throws:
IntrospectionException (src) - if the accessor methods are not valid for this attribute

ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(java.lang.String name,
                               java.lang.String type,
                               java.lang.String description,
                               boolean isReadable,
                               boolean isWritable,
                               boolean isIs)
Creates a new attribute info object with a default descriptor.

Parameters:
name - name of the attribute
type - fully qualified class name of the attribute's type
description - human readable description string
isReadable - true if attribute is readable; false otherwise
isWritable - true if attribute is writable; false otherwise
isIs - (not used for Model MBeans; false)

ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(java.lang.String name,
                               java.lang.String type,
                               java.lang.String description,
                               boolean isReadable,
                               boolean isWritable,
                               boolean isIs,
                               Descriptor (src)  descriptor)
Creates a new attribute info object with a given descriptor. If a null or invalid descriptor is passed as a parameter, a default descriptor will be created for the attribute.

Parameters:
name - name of the attribute
type - fully qualified class name of the attribute's type
description - human readable description string
isReadable - true if the attribute is readable; false otherwise
isWritable - true if the attribute is writable; false otherwise
isIs - (not used for Model MBeans; false)

ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(ModelMBeanAttributeInfo (src)  info)
Copy constructor.

Parameters:
info - the attribute info to copy
Method Detail

getDescriptor

public Descriptor (src)  getDescriptor()
Returns a copy of the descriptor associated with this attribute.

Specified by:
getDescriptor in interface DescriptorAccess (src)
Returns:
a copy of this attribute's descriptor

setDescriptor

public void setDescriptor(Descriptor (src)  inDescriptor)
Replaces the descriptor associated with this attribute. If the inDescriptor argument is null then the existing descriptor is replaced with a default descriptor.

Specified by:
setDescriptor in interface DescriptorAccess (src)
Parameters:
inDescriptor - descriptor used for replacing the existing operation descriptor
Throws:
java.lang.IllegalArgumentException - if the new descriptor is not valid

clone

public java.lang.Object clone()
Creates a copy of this object.

Overrides:
clone in class MBeanAttributeInfo (src)
Returns:
clone of this object

toString

public java.lang.String toString()
Returns a string representation of this Model MBean attribute info object. The returned string is in the form:

   ModelMBeanAttributeInfo[Name=<attribute name>,
   Type=<class name of the attribute type>,
   Access= RW | RO | WO,
   Descriptor=(fieldName1=fieldValue1, ... , fieldName<n>=fieldValue<n>)]

 

Overrides:
toString in class MBeanAttributeInfo (src)
Returns:
string representation of this object