org.jfox.mx
Class MxInfo

java.lang.Object
  extended byorg.jfox.mx.MxInfo
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class MxInfo
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

See Also:
Serialized Form

Constructor Summary
MxInfo(java.lang.String className, java.lang.String description, MxConstructorInfo[] constructors, MxOperationInfo[] operations)
          Constructs an MxInfo.
 
Method Summary
 java.lang.Object clone()
          Returns a shallow clone of this instance.
 boolean equals(java.lang.Object o)
          Compare this MxInfo to another.
 java.lang.String getClassName()
          Returns the name of the Java class of the MBean described by this MxInfo.
 MxConstructorInfo[] getConstructors()
          Returns the list of the public constructors of the MBean.
 java.lang.String getDescription()
          Returns a human readable description of the MBean.
 MxOperationInfo[] getOperations()
          Returns the list of operations of the MBean.
 int hashCode()
          Returns a hash code value for the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MxInfo

public MxInfo(java.lang.String className,
              java.lang.String description,
              MxConstructorInfo[] constructors,
              MxOperationInfo[] operations)
       throws java.lang.IllegalArgumentException
Constructs an MxInfo.

Parameters:
className - The name of the Java class of the MBean described by this MxInfo. This value may be any syntactically legal Java class name. It does not have to be a Java class known to the MBean server or to the MBean's ClassLoader. If it is a Java class known to the MBean's ClassLoader, it is recommended but not required that the class's public methods include those that would appear in a Standard MBean implementing the attributes and operations in this MxInfo.
description - A human readable description of the MBean (optional).
constructors - The list of public constructors of the MBean. This may be null with the same effect as a zero-length array.
operations - The list of operations of the MBean. This may be null with the same effect as a zero-length array.
Throws:
java.lang.IllegalArgumentException - if className is not a syntactically legal Java type name. Java reserved words are not considered illegal here.
Method Detail

clone

public java.lang.Object clone()

Returns a shallow clone of this instance. The clone is obtained by simply calling super.clone(), thus calling the default native shallow cloning mechanism implemented by Object.clone(). No deeper cloning of any internal field is made.

Since this class is immutable, the clone method is chiefly of interest to subclasses.

Returns:
a clone of this instance.
See Also:
Cloneable

getClassName

public java.lang.String getClassName()
Returns the name of the Java class of the MBean described by this MxInfo.

Returns:
the class name.

getDescription

public java.lang.String getDescription()
Returns a human readable description of the MBean.

Returns:
the description.

getOperations

public MxOperationInfo[] getOperations()
Returns the list of operations of the MBean. Each operation is described by an MxOperationInfo object. The returned array is a shallow copy of the internal array, which means that it is a copy of the internal array of references to the MxOperationInfo objects but that each referenced MxOperationInfo object is not copied.

Returns:
An array of MxOperationInfo objects.

getConstructors

public MxConstructorInfo[] getConstructors()

Returns the list of the public constructors of the MBean. Each constructor is described by an MxConstructorInfo object.

The returned array is a shallow copy of the internal array, which means that it is a copy of the internal array of references to the MxConstructorInfo objects but that each referenced MxConstructorInfo object is not copied.

The returned list is not necessarily exhaustive. That is, the MBean may have a public constructor that is not in the list. In this case, the MBean server can construct another instance of this MBean's class using that constructor, even though it is not listed here.

Returns:
An array of MxConstructorInfo objects.

equals

public boolean equals(java.lang.Object o)

Compare this MxInfo to another. Two MxInfo objects are equal iff they return equal values for getClassName() and for getDescription(), and the arrays returned by the two objects for #getAttributes(), getOperations(), getConstructors() equal. Here "equal" means Object.equals(Object), not identity.

If two MxInfo objects return the same values in one of their arrays but in a different order then they are not equal.

Parameters:
o - the object to compare to.
Returns:
true iff o is an MxInfo that is equal to this one according to the rules above.
See Also:
Object.hashCode(), Hashtable

hashCode

public int hashCode()
Description copied from class: java.lang.Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable