KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > management > openmbean > OpenMBeanConstructorInfo


1 /*
2  * @(#)OpenMBeanConstructorInfo.java 3.19 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8
9 package javax.management.openmbean;
10
11
12 // java import
13
//
14

15
16 // jmx import
17
//
18
import javax.management.MBeanParameterInfo JavaDoc;
19
20
21 /**
22  * <p>Describes a constructor of an Open MBean.</p>
23  *
24  * <p>This interface declares the same methods as the class {@link
25  * javax.management.MBeanConstructorInfo}. A class implementing this
26  * interface (typically {@link OpenMBeanConstructorInfoSupport})
27  * should extend {@link javax.management.MBeanConstructorInfo}.</p>
28  *
29  * <p>The {@link #getSignature()} method should return at runtime an
30  * array of instances of a subclass of {@link MBeanParameterInfo}
31  * which implements the {@link OpenMBeanParameterInfo} interface
32  * (typically {@link OpenMBeanParameterInfoSupport}).</p>
33  *
34  *
35  * @version 3.19 03/12/19
36  * @author Sun Microsystems, Inc.
37  *
38  * @since 1.5
39  * @since.unbundled JMX 1.1
40  */

41 public interface OpenMBeanConstructorInfo {
42
43     // Re-declares the methods that are in class MBeanConstructorInfo of JMX 1.0
44
// (methods will be removed when MBeanConstructorInfo is made a parent interface of this interface)
45

46     /**
47      * Returns a human readable description of the constructor
48      * described by this <tt>OpenMBeanConstructorInfo</tt> instance.
49      *
50      * @return the description.
51      */

52     public String JavaDoc getDescription() ;
53
54     /**
55      * Returns the name of the constructor
56      * described by this <tt>OpenMBeanConstructorInfo</tt> instance.
57      *
58      * @return the name.
59      */

60     public String JavaDoc getName() ;
61
62     /**
63      * Returns an array of <tt>OpenMBeanParameterInfo</tt> instances
64      * describing each parameter in the signature of the constructor
65      * described by this <tt>OpenMBeanConstructorInfo</tt> instance.
66      *
67      * @return the signature.
68      */

69     public MBeanParameterInfo JavaDoc[] getSignature() ;
70
71
72     // commodity methods
73
//
74

75     /**
76      * Compares the specified <var>obj</var> parameter with this <code>OpenMBeanConstructorInfo</code> instance for equality.
77      * <p>
78      * Returns <tt>true</tt> if and only if all of the following statements are true:
79      * <ul>
80      * <li><var>obj</var> is non null,</li>
81      * <li><var>obj</var> also implements the <code>OpenMBeanConstructorInfo</code> interface,</li>
82      * <li>their names are equal</li>
83      * <li>their signatures are equal.</li>
84      * </ul>
85      * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are
86      * different implementations of the <code>OpenMBeanConstructorInfo</code> interface.
87      * <br>&nbsp;
88      * @param obj the object to be compared for equality with this <code>OpenMBeanConstructorInfo</code> instance;
89      *
90      * @return <code>true</code> if the specified object is equal to this <code>OpenMBeanConstructorInfo</code> instance.
91      */

92     public boolean equals(Object JavaDoc obj);
93
94     /**
95      * Returns the hash code value for this <code>OpenMBeanConstructorInfo</code> instance.
96      * <p>
97      * The hash code of an <code>OpenMBeanConstructorInfo</code> instance is the sum of the hash codes
98      * of all elements of information used in <code>equals</code> comparisons
99      * (ie: its name and signature, where the signature hashCode is calculated by a call to
100      * <tt>java.util.Arrays.asList(this.getSignature).hashCode()</tt>).
101      * <p>
102      * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code>
103      * for any two <code>OpenMBeanConstructorInfo</code> instances <code>t1</code> and <code>t2</code>,
104      * as required by the general contract of the method
105      * {@link Object#hashCode() Object.hashCode()}.
106      * <p>
107      *
108      * @return the hash code value for this <code>OpenMBeanConstructorInfo</code> instance
109      */

110     public int hashCode();
111
112     /**
113      * Returns a string representation of this <code>OpenMBeanConstructorInfo</code> instance.
114      * <p>
115      * The string representation consists of the name of this class (ie <code>javax.management.openmbean.OpenMBeanConstructorInfo</code>),
116      * and the name and signature of the described constructor.
117      *
118      * @return a string representation of this <code>OpenMBeanConstructorInfo</code> instance
119      */

120     public String JavaDoc toString();
121
122 }
123
Popular Tags