javax.management
Class MBeanAttributeInfo

java.lang.Object
  |
  +--javax.management.MBeanFeatureInfo
        |
        +--javax.management.MBeanAttributeInfo
Direct Known Subclasses:
ModelMBeanAttributeInfo, OpenMBeanAttributeInfo

public class MBeanAttributeInfo
extends MBeanFeatureInfo
implements java.io.Serializable, java.lang.Cloneable

Describes an MBean attribute exposed for management. Instances of this class are immutable. Subclasses may be mutable but this is not recommended.

See Also:
Serialized Form

Field Summary
(package private) static MBeanAttributeInfo[] NO_ATTRIBUTES
           
 
Fields inherited from class javax.management.MBeanFeatureInfo
description, name
 
Constructor Summary
MBeanAttributeInfo(java.lang.String name, java.lang.String description, java.lang.reflect.Method getter, java.lang.reflect.Method setter)
          This constructor takes the name of a simple attribute, and Method objects for reading and writing the attribute.
MBeanAttributeInfo(java.lang.String name, java.lang.String type, java.lang.String description, boolean isReadable, boolean isWritable, boolean isIs)
          Constructs an MBeanAttributeInfo object.
 
Method Summary
(package private) static void ()
           
 java.lang.Object clone()
          Creates and returns a copy of this object.
 boolean equals(java.lang.Object obj)
          Compare this MBeanAttributeInfo to another.
 java.lang.String getType()
          Returns the class name of the attribute.
 int hashCode()
          Returns the hash code value for this instance.
 boolean isIs()
          Indicates if this attribute has an "is" getter.
 boolean isReadable()
          Whether the value of the attribute can be read.
 boolean isWritable()
          Whether new values can be written to the attribute.
 java.lang.String toString()
          Returns a human readable version of the MBeanAttributeInfo instance
 
Methods inherited from class javax.management.MBeanFeatureInfo
getDescription, getName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_ATTRIBUTES

static final MBeanAttributeInfo[] NO_ATTRIBUTES
Constructor Detail

MBeanAttributeInfo

public MBeanAttributeInfo(java.lang.String name,
                          java.lang.String type,
                          java.lang.String description,
                          boolean isReadable,
                          boolean isWritable,
                          boolean isIs)
                   throws java.lang.IllegalArgumentException
Constructs an MBeanAttributeInfo object.
Parameters:
name - The name of the attribute.
type - The type or class name of the attribute.
description - A human readable description of the attribute.
isReadable - True if the attribute has a getter method, false otherwise.
isWritable - True if the attribute has a setter method, false otherwise.
isIs - True if this attribute has an "is" getter, false otherwise.
Throws:
java.lang.IllegalArgumentException - if name is not a valid Java identifier or if type is not a syntactically legal Java type name. Java reserved words are not considered illegal here.

MBeanAttributeInfo

public MBeanAttributeInfo(java.lang.String name,
                          java.lang.String description,
                          java.lang.reflect.Method getter,
                          java.lang.reflect.Method setter)
                   throws IntrospectionException
This constructor takes the name of a simple attribute, and Method objects for reading and writing the attribute.
Parameters:
name - The programmatic name of the attribute.
description - A human readable description of the attribute.
getter - The method used for reading the attribute value. May be null if the property is write-only.
setter - The method used for writing the attribute value. May be null if the attribute is read-only.
Throws:
IntrospectionException - There is a consistency problem in the definition of this attribute.
Method Detail

static void ()

getType

public java.lang.String getType()
Returns the class name of the attribute.
Returns:
The class name is returned as String

isReadable

public boolean isReadable()
Whether the value of the attribute can be read.
Returns:
True if the attribute can be read, false otherwise.

isWritable

public boolean isWritable()
Whether new values can be written to the attribute.
Returns:
True if the attribute can be written, false otherwise.

isIs

public boolean isIs()
Indicates if this attribute has an "is" getter.
Returns:
true if this attribute has an "is" getter.

clone

public java.lang.Object clone()
Creates and returns a copy of this object.
Overrides:
clone in class java.lang.Object
Returns:
Creates a duplicate copy of the object

equals

public boolean equals(java.lang.Object obj)
Compare this MBeanAttributeInfo to another.
Overrides:
equals in class MBeanFeatureInfo
Parameters:
o - the object to compare to.
Returns:
true iff o is an MBeanAttributeInfo such that its MBeanFeatureInfo.getName(), getType(), MBeanFeatureInfo.getDescription(), isReadable(), isWritable(), and isIs() values are equal (not necessarily identical) to those of this MBeanAttributeInfo.

hashCode

public int hashCode()
Returns the hash code value for this instance.
Overrides:
hashCode in class MBeanFeatureInfo
Returns:
hashCode for this instance

toString

public java.lang.String toString()
Returns a human readable version of the MBeanAttributeInfo instance
Overrides:
toString in class MBeanFeatureInfo
Returns:
MBeanAttributeInfo is returned as a String