Home » openjdk-7 » javax » management » openmbean » [javadoc | source]
javax.management.openmbean
public class: OpenMBeanConstructorInfoSupport [javadoc | source]
java.lang.Object
   javax.management.MBeanFeatureInfo
      javax.management.MBeanConstructorInfo
         javax.management.openmbean.OpenMBeanConstructorInfoSupport

All Implemented Interfaces:
    OpenMBeanConstructorInfo, Cloneable, DescriptorRead, Serializable

Describes a constructor of an Open MBean.
Field Summary
static final  long serialVersionUID     
Fields inherited from javax.management.MBeanConstructorInfo:
serialVersionUID,  NO_CONSTRUCTORS
Fields inherited from javax.management.MBeanFeatureInfo:
serialVersionUID,  name,  description
Constructor:
 public OpenMBeanConstructorInfoSupport(String name,
    String description,
    OpenMBeanParameterInfo[] signature) 

    Constructs an {@code OpenMBeanConstructorInfoSupport} instance, which describes the constructor of a class of open MBeans with the specified {@code name}, {@code description} and {@code signature}.

    The {@code signature} array parameter is internally copied, so that subsequent changes to the array referenced by {@code signature} have no effect on this instance.

    Parameters:
    name - cannot be a null or empty string.
    description - cannot be a null or empty string.
    signature - can be null or empty if there are no parameters to describe.
    Throws:
    IllegalArgumentException - if {@code name} or {@code description} are null or empty string.
    ArrayStoreException - If {@code signature} is not an array of instances of a subclass of {@code MBeanParameterInfo}.
 public OpenMBeanConstructorInfoSupport(String name,
    String description,
    OpenMBeanParameterInfo[] signature,
    Descriptor descriptor) 

    Constructs an {@code OpenMBeanConstructorInfoSupport} instance, which describes the constructor of a class of open MBeans with the specified {@code name}, {@code description}, {@code signature}, and {@code descriptor}.

    The {@code signature} array parameter is internally copied, so that subsequent changes to the array referenced by {@code signature} have no effect on this instance.

    Parameters:
    name - cannot be a null or empty string.
    description - cannot be a null or empty string.
    signature - can be null or empty if there are no parameters to describe.
    descriptor - The descriptor for the constructor. This may be null which is equivalent to an empty descriptor.
    Throws:
    IllegalArgumentException - if {@code name} or {@code description} are null or empty string.
    ArrayStoreException - If {@code signature} is not an array of instances of a subclass of {@code MBeanParameterInfo}.
    since: 1.6 -
Method from javax.management.openmbean.OpenMBeanConstructorInfoSupport Summary:
equals,   hashCode,   toString
Methods from javax.management.MBeanConstructorInfo:
clone,   equals,   getSignature,   hashCode,   toString
Methods from javax.management.MBeanFeatureInfo:
equals,   getDescription,   getDescriptor,   getName,   hashCode
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.management.openmbean.OpenMBeanConstructorInfoSupport Detail:
 public boolean equals(Object obj) 

    Compares the specified {@code obj} parameter with this {@code OpenMBeanConstructorInfoSupport} instance for equality.

    Returns {@code true} if and only if all of the following statements are true:

    • {@code obj} is non null,
    • {@code obj} also implements the {@code OpenMBeanConstructorInfo} interface,
    • their names are equal
    • their signatures are equal.
    This ensures that this {@code equals} method works properly for {@code obj} parameters which are different implementations of the {@code OpenMBeanConstructorInfo} interface.
 public int hashCode() 

    Returns the hash code value for this {@code OpenMBeanConstructorInfoSupport} instance.

    The hash code of an {@code OpenMBeanConstructorInfoSupport} instance is the sum of the hash codes of all elements of information used in {@code equals} comparisons (ie: its name and signature, where the signature hashCode is calculated by a call to {@code java.util.Arrays.asList(this.getSignature).hashCode()}).

    This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()} for any two {@code OpenMBeanConstructorInfoSupport} instances {@code t1} and {@code t2}, as required by the general contract of the method Object.hashCode() .

    However, note that another instance of a class implementing the {@code OpenMBeanConstructorInfo} interface may be equal to this {@code OpenMBeanConstructorInfoSupport} instance as defined by #equals(java.lang.Object) , but may have a different hash code if it is calculated differently.

    As {@code OpenMBeanConstructorInfoSupport} instances are immutable, the hash code for this instance is calculated once, on the first call to {@code hashCode}, and then the same value is returned for subsequent calls.

 public String toString() 

    Returns a string representation of this {@code OpenMBeanConstructorInfoSupport} instance.

    The string representation consists of the name of this class (ie {@code javax.management.openmbean.OpenMBeanConstructorInfoSupport}), the name and signature of the described constructor and the string representation of its descriptor.

    As {@code OpenMBeanConstructorInfoSupport} instances are immutable, the string representation for this instance is calculated once, on the first call to {@code toString}, and then the same value is returned for subsequent calls.