public class OpenMBeanConstructorInfoSupport extends MBeanConstructorInfo implements OpenMBeanConstructorInfo
description, name| Constructor and Description |
|---|
OpenMBeanConstructorInfoSupport(String name, String description, OpenMBeanParameterInfo[] signature)
构造一个
OpenMBeanConstructorInfoSupport实例,该实例描述open MBean类的构造函数使用指定的
name ,
description和
signature 。
|
OpenMBeanConstructorInfoSupport(String name, String description, OpenMBeanParameterInfo[] signature, Descriptor descriptor)
构造一个
OpenMBeanConstructorInfoSupport实例,该实例描述open MBean类与指定的构造
name ,
description ,
signature和
descriptor 。
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
将指定的
obj参数与此
OpenMBeanConstructorInfoSupport实例相比较。
|
int |
hashCode()
返回此
OpenMBeanConstructorInfoSupport实例的哈希码值。
|
String |
toString()
返回此
OpenMBeanConstructorInfoSupport实例的字符串表示形式。
|
clone, getSignaturegetDescription, getDescriptor, getNamefinalize, getClass, notify, notifyAll, wait, wait, waitgetDescription, getName, getSignaturepublic OpenMBeanConstructorInfoSupport(String name, String description, OpenMBeanParameterInfo[] signature)
构造一个OpenMBeanConstructorInfoSupport实例,该实例描述open MBean类的构造函数使用指定的name , description和signature 。
所述signature数组参数在内部复制,因此通过引用的数组的后续变化signature对此实例没有影响。
name - 不能为null或空字符串。
description - 不能为null或空字符串。
signature - 如果没有参数要描述,可以为空或为空。
IllegalArgumentException - 如果
name或
description为空或空字符串。
ArrayStoreException - 如果
signature不是MBeanParameterInfo子类的
MBeanParameterInfo 。
public OpenMBeanConstructorInfoSupport(String name, String description, OpenMBeanParameterInfo[] signature, Descriptor descriptor)
构造一个OpenMBeanConstructorInfoSupport实例,该实例描述open MBean类与指定的构造name , description , signature和descriptor 。
所述signature数组参数在内部复制,因此通过引用的数组的后续变化signature对此实例没有影响。
name - 不能为null或空字符串。
description - 不能为null或空字符串。
signature - 如果没有要描述的
signature ,可以为空或为空。
descriptor - 构造函数的描述符。
这可能是空的,这相当于空描述符。
IllegalArgumentException - 如果
name或
description为空或空字符串。
ArrayStoreException - 如果
signature不是MBeanParameterInfo子类的
MBeanParameterInfo 。
public boolean equals(Object obj)
将指定的obj参数与此OpenMBeanConstructorInfoSupport实例相比较。
返回true当且仅当以下所有语句都为真时:
obj是非空, obj还实现了OpenMBeanConstructorInfo接口, equals方法适用于obj参数,它们是OpenMBeanConstructorInfo接口的OpenMBeanConstructorInfo实现。
equals在接口
OpenMBeanConstructorInfo
equals在
MBeanConstructorInfo
obj - 要与此
OpenMBeanConstructorInfoSupport实例相等的对象;
true如果指定的对象等于这个
OpenMBeanConstructorInfoSupport实例。
Object.hashCode() , HashMap
public int hashCode()
返回此OpenMBeanConstructorInfoSupport实例的哈希码值。
一个的哈希码OpenMBeanConstructorInfoSupport实例中使用的所有信息元素的哈希码的总和equals比较(即:其名称和签名,其中签名的hashCode由呼叫计算为java.util.Arrays.asList(this.getSignature).hashCode() )。
这确保t1.equals(t2)意味着t1.hashCode()==t2.hashCode()对于任何两个OpenMBeanConstructorInfoSupport实例t1和t2 ,根据方法Object.hashCode()的一般合同的要求 。
但是,请注意,实现OpenMBeanConstructorInfo接口的类的另一个实例可能与OpenMBeanConstructorInfoSupport定义的OpenMBeanConstructorInfoSupport实例相同 ,但如果不同的计算方式可能具有不同的哈希码。
由于OpenMBeanConstructorInfoSupport实例是不可变的,所以在第一次调用hashCode时,该实例的哈希码被计算一次,然后返回相同的值用于后续调用。
hashCode在接口
OpenMBeanConstructorInfo
hashCode在
MBeanConstructorInfo类
OpenMBeanConstructorInfoSupport实例的哈希码值
Object.equals(java.lang.Object) ,
System.identityHashCode(java.lang.Object)
public String toString()
返回此OpenMBeanConstructorInfoSupport实例的字符串表示形式。
字符串表示由此类的名称(即javax.management.openmbean.OpenMBeanConstructorInfoSupport )组成,描述的构造函数的名称和签名以及其描述符的字符串表示形式。
由于OpenMBeanConstructorInfoSupport实例是不可变的,所以在第一次调用toString时,该实例的字符串表示计算一次,然后为后续调用返回相同的值。
toString在接口
OpenMBeanConstructorInfo
toString在
MBeanConstructorInfo
OpenMBeanConstructorInfoSupport实例的字符串表示形式
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.