jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanConstructorInfo.java
changeset 32034 05676cfd40b5
parent 25859 3317bb8137f4
equal deleted inserted replaced
32033:bf24e33c7919 32034:05676cfd40b5
    58     // Re-declares the methods that are in class MBeanConstructorInfo of JMX 1.0
    58     // Re-declares the methods that are in class MBeanConstructorInfo of JMX 1.0
    59     // (methods will be removed when MBeanConstructorInfo is made a parent interface of this interface)
    59     // (methods will be removed when MBeanConstructorInfo is made a parent interface of this interface)
    60 
    60 
    61     /**
    61     /**
    62      * Returns a human readable description of the constructor
    62      * Returns a human readable description of the constructor
    63      * described by this <tt>OpenMBeanConstructorInfo</tt> instance.
    63      * described by this {@code OpenMBeanConstructorInfo} instance.
    64      *
    64      *
    65      * @return the description.
    65      * @return the description.
    66      */
    66      */
    67     public String getDescription() ;
    67     public String getDescription() ;
    68 
    68 
    69     /**
    69     /**
    70      * Returns the name of the constructor
    70      * Returns the name of the constructor
    71      * described by this <tt>OpenMBeanConstructorInfo</tt> instance.
    71      * described by this {@code OpenMBeanConstructorInfo} instance.
    72      *
    72      *
    73      * @return the name.
    73      * @return the name.
    74      */
    74      */
    75     public String getName() ;
    75     public String getName() ;
    76 
    76 
    77     /**
    77     /**
    78      * Returns an array of <tt>OpenMBeanParameterInfo</tt> instances
    78      * Returns an array of {@code OpenMBeanParameterInfo} instances
    79      * describing each parameter in the signature of the constructor
    79      * describing each parameter in the signature of the constructor
    80      * described by this <tt>OpenMBeanConstructorInfo</tt> instance.
    80      * described by this {@code OpenMBeanConstructorInfo} instance.
    81      *
    81      *
    82      * @return the signature.
    82      * @return the signature.
    83      */
    83      */
    84     public MBeanParameterInfo[] getSignature() ;
    84     public MBeanParameterInfo[] getSignature() ;
    85 
    85 
    86 
    86 
    87     // commodity methods
    87     // commodity methods
    88     //
    88     //
    89 
    89 
    90     /**
    90     /**
    91      * Compares the specified <var>obj</var> parameter with this <code>OpenMBeanConstructorInfo</code> instance for equality.
    91      * Compares the specified <var>obj</var> parameter with this {@code OpenMBeanConstructorInfo} instance for equality.
    92      * <p>
    92      * <p>
    93      * Returns <tt>true</tt> if and only if all of the following statements are true:
    93      * Returns {@code true} if and only if all of the following statements are true:
    94      * <ul>
    94      * <ul>
    95      * <li><var>obj</var> is non null,</li>
    95      * <li><var>obj</var> is non null,</li>
    96      * <li><var>obj</var> also implements the <code>OpenMBeanConstructorInfo</code> interface,</li>
    96      * <li><var>obj</var> also implements the {@code OpenMBeanConstructorInfo} interface,</li>
    97      * <li>their names are equal</li>
    97      * <li>their names are equal</li>
    98      * <li>their signatures are equal.</li>
    98      * <li>their signatures are equal.</li>
    99      * </ul>
    99      * </ul>
   100      * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are
   100      * This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are
   101      * different implementations of the <code>OpenMBeanConstructorInfo</code> interface.
   101      * different implementations of the {@code OpenMBeanConstructorInfo} interface.
   102      * <br>&nbsp;
   102      * <br>&nbsp;
   103      * @param  obj  the object to be compared for equality with this <code>OpenMBeanConstructorInfo</code> instance;
   103      * @param  obj  the object to be compared for equality with this {@code OpenMBeanConstructorInfo} instance;
   104      *
   104      *
   105      * @return  <code>true</code> if the specified object is equal to this <code>OpenMBeanConstructorInfo</code> instance.
   105      * @return  {@code true} if the specified object is equal to this {@code OpenMBeanConstructorInfo} instance.
   106      */
   106      */
   107     public boolean equals(Object obj);
   107     public boolean equals(Object obj);
   108 
   108 
   109     /**
   109     /**
   110      * Returns the hash code value for this <code>OpenMBeanConstructorInfo</code> instance.
   110      * Returns the hash code value for this {@code OpenMBeanConstructorInfo} instance.
   111      * <p>
   111      * <p>
   112      * The hash code of an <code>OpenMBeanConstructorInfo</code> instance is the sum of the hash codes
   112      * The hash code of an {@code OpenMBeanConstructorInfo} instance is the sum of the hash codes
   113      * of all elements of information used in <code>equals</code> comparisons
   113      * of all elements of information used in {@code equals} comparisons
   114      * (ie: its name and signature, where the signature hashCode is calculated by a call to
   114      * (ie: its name and signature, where the signature hashCode is calculated by a call to
   115      *  <tt>java.util.Arrays.asList(this.getSignature).hashCode()</tt>).
   115      *  {@code java.util.Arrays.asList(this.getSignature).hashCode()}).
   116      * <p>
   116      * <p>
   117      * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code>
   117      * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
   118      * for any two <code>OpenMBeanConstructorInfo</code> instances <code>t1</code> and <code>t2</code>,
   118      * for any two {@code OpenMBeanConstructorInfo} instances {@code t1} and {@code t2},
   119      * as required by the general contract of the method
   119      * as required by the general contract of the method
   120      * {@link Object#hashCode() Object.hashCode()}.
   120      * {@link Object#hashCode() Object.hashCode()}.
   121      *
   121      *
   122      * @return  the hash code value for this <code>OpenMBeanConstructorInfo</code> instance
   122      * @return  the hash code value for this {@code OpenMBeanConstructorInfo} instance
   123      */
   123      */
   124     public int hashCode();
   124     public int hashCode();
   125 
   125 
   126     /**
   126     /**
   127      * Returns a string representation of this <code>OpenMBeanConstructorInfo</code> instance.
   127      * Returns a string representation of this {@code OpenMBeanConstructorInfo} instance.
   128      * <p>
   128      * <p>
   129      * The string representation consists of the name of this class (ie <code>javax.management.openmbean.OpenMBeanConstructorInfo</code>),
   129      * The string representation consists of the name of this class
       
   130      * (ie {@code javax.management.openmbean.OpenMBeanConstructorInfo}),
   130      * and the name and signature of the described constructor.
   131      * and the name and signature of the described constructor.
   131      *
   132      *
   132      * @return  a string representation of this <code>OpenMBeanConstructorInfo</code> instance
   133      * @return  a string representation of this {@code OpenMBeanConstructorInfo} instance
   133      */
   134      */
   134     public String toString();
   135     public String toString();
   135 
   136 
   136 }
   137 }