javax.management.openmbean
Class OpenMBeanInfoSupport

java.lang.Object
  extended byjavax.management.MBeanInfo (src) 
      extended byjavax.management.openmbean.OpenMBeanInfoSupport
All Implemented Interfaces:
java.lang.Cloneable, OpenMBeanInfo (src) , java.io.Serializable

public class OpenMBeanInfoSupport
extends MBeanInfo (src)
implements OpenMBeanInfo (src) , java.io.Serializable

OpenMBeanInfo implementation

See Also:
Serialized Form

Constructor Summary
OpenMBeanInfoSupport(java.lang.String className, java.lang.String description, OpenMBeanAttributeInfo (src) [] attributes, OpenMBeanConstructorInfo (src) [] constructors, OpenMBeanOperationInfo (src) [] operations, MBeanNotificationInfo (src) [] notifications)
          Contruct an OpenMBeanInfoSupport
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares an object for equality with the implementing class.
 int hashCode()
          Generates a hashcode for the implementation.
 java.lang.String toString()
          A string representation of the open mbean info.
 
Methods inherited from class javax.management.MBeanInfo (src)
clone, getAttributes, getClassName, getConstructors, getDescription, getNotifications, getOperations
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.management.openmbean.OpenMBeanInfo (src)
getAttributes, getClassName, getConstructors, getDescription, getNotifications, getOperations
 

Constructor Detail

OpenMBeanInfoSupport

public OpenMBeanInfoSupport(java.lang.String className,
                            java.lang.String description,
                            OpenMBeanAttributeInfo (src) [] attributes,
                            OpenMBeanConstructorInfo (src) [] constructors,
                            OpenMBeanOperationInfo (src) [] operations,
                            MBeanNotificationInfo (src) [] notifications)
Contruct an OpenMBeanInfoSupport

Parameters:
className - cannot be null or empty
description - cannot be null or empty
attributes - the open mbean's attributes
constructors - the open mbean's constructors
operations - the open mbean's operations
notifications - the open mbean's notifications
Throws:
java.lang.IllegalArgumentException - when one of the above constraints is not satisfied
Method Detail

equals

public boolean equals(java.lang.Object obj)
Description copied from interface: OpenMBeanInfo (src)
Compares an object for equality with the implementing class.

The object is not null
The object implements the open mbean info interface
The getClassName() methods return strings that are equal
The information objects (attributes, constructors, operations and notifications) are the equal

Specified by:
equals in interface OpenMBeanInfo (src)
Overrides:
equals in class MBeanInfo (src)

hashCode

public int hashCode()
Description copied from interface: OpenMBeanInfo (src)
Generates a hashcode for the implementation.

The hashcode is the sum of the hashcodes for
getClassName()
java.util.HashSet(java.util.Arrays.asList(getAttributes()).hashCode()
java.util.HashSet(java.util.Arrays.asList(getConstructors()).hashCode()
java.util.HashSet(java.util.Arrays.asList(getOperations()).hashCode()
java.util.HashSet(java.util.Arrays.asList(getNotifications()).hashCode()

Specified by:
hashCode in interface OpenMBeanInfo (src)
Overrides:
hashCode in class MBeanInfo (src)

toString

public java.lang.String toString()
Description copied from interface: OpenMBeanInfo (src)
A string representation of the open mbean info.

It is made up of
The implementing class
getClassName()
toString() for each of the info arrays

Specified by:
toString in interface OpenMBeanInfo (src)
Overrides:
toString in class MBeanInfo (src)
Returns:
a human readable string