author | avstepan |
Thu, 06 Aug 2015 13:59:10 +0300 | |
changeset 32034 | 05676cfd40b5 |
parent 25859 | 3317bb8137f4 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
24368 | 2 |
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
||
27 |
package javax.management.openmbean; |
|
28 |
||
29 |
||
30 |
// java import |
|
31 |
// |
|
32 |
||
33 |
||
34 |
// jmx import |
|
35 |
// |
|
36 |
import javax.management.MBeanParameterInfo; |
|
37 |
||
38 |
||
39 |
/** |
|
40 |
* <p>Describes a constructor of an Open MBean.</p> |
|
41 |
* |
|
42 |
* <p>This interface declares the same methods as the class {@link |
|
43 |
* javax.management.MBeanConstructorInfo}. A class implementing this |
|
44 |
* interface (typically {@link OpenMBeanConstructorInfoSupport}) |
|
45 |
* should extend {@link javax.management.MBeanConstructorInfo}.</p> |
|
46 |
* |
|
47 |
* <p>The {@link #getSignature()} method should return at runtime an |
|
48 |
* array of instances of a subclass of {@link MBeanParameterInfo} |
|
49 |
* which implements the {@link OpenMBeanParameterInfo} interface |
|
50 |
* (typically {@link OpenMBeanParameterInfoSupport}).</p> |
|
51 |
* |
|
52 |
* |
|
53 |
* |
|
54 |
* @since 1.5 |
|
55 |
*/ |
|
56 |
public interface OpenMBeanConstructorInfo { |
|
57 |
||
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) |
|
60 |
||
61 |
/** |
|
62 |
* Returns a human readable description of the constructor |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
63 |
* described by this {@code OpenMBeanConstructorInfo} instance. |
2 | 64 |
* |
65 |
* @return the description. |
|
66 |
*/ |
|
67 |
public String getDescription() ; |
|
68 |
||
69 |
/** |
|
70 |
* Returns the name of the constructor |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
71 |
* described by this {@code OpenMBeanConstructorInfo} instance. |
2 | 72 |
* |
73 |
* @return the name. |
|
74 |
*/ |
|
75 |
public String getName() ; |
|
76 |
||
77 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
78 |
* Returns an array of {@code OpenMBeanParameterInfo} instances |
2 | 79 |
* describing each parameter in the signature of the constructor |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
80 |
* described by this {@code OpenMBeanConstructorInfo} instance. |
2 | 81 |
* |
82 |
* @return the signature. |
|
83 |
*/ |
|
84 |
public MBeanParameterInfo[] getSignature() ; |
|
85 |
||
86 |
||
87 |
// commodity methods |
|
88 |
// |
|
89 |
||
90 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
91 |
* Compares the specified <var>obj</var> parameter with this {@code OpenMBeanConstructorInfo} instance for equality. |
2 | 92 |
* <p> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
93 |
* Returns {@code true} if and only if all of the following statements are true: |
2 | 94 |
* <ul> |
95 |
* <li><var>obj</var> is non null,</li> |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
96 |
* <li><var>obj</var> also implements the {@code OpenMBeanConstructorInfo} interface,</li> |
2 | 97 |
* <li>their names are equal</li> |
98 |
* <li>their signatures are equal.</li> |
|
99 |
* </ul> |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
100 |
* This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
101 |
* different implementations of the {@code OpenMBeanConstructorInfo} interface. |
2 | 102 |
* <br> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
103 |
* @param obj the object to be compared for equality with this {@code OpenMBeanConstructorInfo} instance; |
2 | 104 |
* |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
105 |
* @return {@code true} if the specified object is equal to this {@code OpenMBeanConstructorInfo} instance. |
2 | 106 |
*/ |
107 |
public boolean equals(Object obj); |
|
108 |
||
109 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
110 |
* Returns the hash code value for this {@code OpenMBeanConstructorInfo} instance. |
2 | 111 |
* <p> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
112 |
* The hash code of an {@code OpenMBeanConstructorInfo} instance is the sum of the hash codes |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
113 |
* of all elements of information used in {@code equals} comparisons |
2 | 114 |
* (ie: its name and signature, where the signature hashCode is calculated by a call to |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
115 |
* {@code java.util.Arrays.asList(this.getSignature).hashCode()}). |
2 | 116 |
* <p> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
117 |
* This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()} |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
118 |
* for any two {@code OpenMBeanConstructorInfo} instances {@code t1} and {@code t2}, |
2 | 119 |
* as required by the general contract of the method |
120 |
* {@link Object#hashCode() Object.hashCode()}. |
|
121 |
* |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
122 |
* @return the hash code value for this {@code OpenMBeanConstructorInfo} instance |
2 | 123 |
*/ |
124 |
public int hashCode(); |
|
125 |
||
126 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
127 |
* Returns a string representation of this {@code OpenMBeanConstructorInfo} instance. |
2 | 128 |
* <p> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
129 |
* The string representation consists of the name of this class |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
130 |
* (ie {@code javax.management.openmbean.OpenMBeanConstructorInfo}), |
2 | 131 |
* and the name and signature of the described constructor. |
132 |
* |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
133 |
* @return a string representation of this {@code OpenMBeanConstructorInfo} instance |
2 | 134 |
*/ |
135 |
public String toString(); |
|
136 |
||
137 |
} |