|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.management.MBeanInfo
javax.management.openmbean.OpenMBeanInfoSupport
public class OpenMBeanInfoSupport
OpenMBeanInfoSupport 类描述 open MBean 的管理信息:它是 MBeanInfo 的子类,并且实现了 OpenMBeanInfo 接口。注意,open MBean 的识别方式是,如果其 getMBeanInfo() 方法返回实现 OpenMBeanInfo 接口(通常为 OpenMBeanInfoSupport)的类的实例,则可识别 open MBean。
| 构造方法摘要 | |
|---|---|
OpenMBeanInfoSupport(String className, String description, OpenMBeanAttributeInfo[] openAttributes, OpenMBeanConstructorInfo[] openConstructors, OpenMBeanOperationInfo[] openOperations, MBeanNotificationInfo[] notifications) 构造一个 OpenMBeanInfoSupport 实例,它使用指定的 className、description、openAttributes、openConstructors、openOperations 和 notifications 描述 open MBeans 的类。 |
|
OpenMBeanInfoSupport(String className, String description, OpenMBeanAttributeInfo[] openAttributes, OpenMBeanConstructorInfo[] openConstructors, OpenMBeanOperationInfo[] openOperations, MBeanNotificationInfo[] notifications, Descriptor descriptor) 构造一个 OpenMBeanInfoSupport 实例,它使用指定的 className、description、openAttributes、openConstructors、openOperations、notifications 和 descriptor 描述 open MBeans 的类 |
|
| 方法摘要 | |
|---|---|
boolean |
equals(Object obj) 比较指定 obj 参数与此 OpenMBeanInfoSupport 实例的相等性。 |
int |
hashCode() 返回此 OpenMBeanInfoSupport 实例的哈希码值。 |
String |
toString() 返回此 OpenMBeanInfoSupport 实例的字符串表示形式。 |
| 从类 javax.management.MBeanInfo 继承的方法 |
|---|
clone, getAttributes, getClassName, getConstructors, getDescription, getDescriptor, getNotifications, getOperations |
| 从类 java.lang.Object 继承的方法 |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| 从接口 javax.management.openmbean.OpenMBeanInfo 继承的方法 |
|---|
getAttributes, getClassName, getConstructors, getDescription, getNotifications, getOperations |
| 构造方法详细信息 |
|---|
public OpenMBeanInfoSupport(String className,
String description,
OpenMBeanAttributeInfo[] openAttributes,
OpenMBeanConstructorInfo[] openConstructors,
OpenMBeanOperationInfo[] openOperations,
MBeanNotificationInfo[] notifications)
构造一个 OpenMBeanInfoSupport 实例,它使用指定的 className、description、openAttributes、openConstructors、openOperations 和 notifications 描述 open MBeans 的类。
openAttributes、openConstructors、openOperations 和 notifications 数组参数是被内部复制的,因此对这些参数引用的数组的后续更改不影响此实例。
className - 此
OpenMBeanInfoSupport 实例描述的 open MBean 的完全限定的 Java 类名。
description - 此
OpenMBeanInfoSupport 实例描述的 open MBean 的可读描述。
openAttributes - 所描述的 open MBean 的公开属性的列表;必须是
MBeanAttributeInfo(通常为
OpenMBeanAttributeInfoSupport)的子类的实例组成的数组。
openConstructors - 所描述的 open MBean 的公开的公用构造方法的列表;必须是
MBeanConstructorInfo(通常为
OpenMBeanConstructorInfoSupport)的子类的实例组成的数组。
openOperations - 所描述的 open MBean 的公开操作的列表。必须是
MBeanOperationInfo(通常为
OpenMBeanOperationInfoSupport)的子类的实例组成的数组。
notifications - 所描述的 open MBean 发出的通知列表。
ArrayStoreException - 如果
openAttributes、
openConstructors、
openOperations 分别不是
MBeanAttributeInfo、
MBeanConstructorInfo、
MBeanOperationInfo 子类的实例组成的数组。
public OpenMBeanInfoSupport(String className,
String description,
OpenMBeanAttributeInfo[] openAttributes,
OpenMBeanConstructorInfo[] openConstructors,
OpenMBeanOperationInfo[] openOperations,
MBeanNotificationInfo[] notifications,
Descriptor descriptor)
构造一个 OpenMBeanInfoSupport 实例,它使用指定的 className、description、openAttributes、openConstructors、openOperations、notifications 和 descriptor 描述 open MBeans 的类
openAttributes、openConstructors、openOperations 和 notifications 数组参数是被内部复制的,因此对这些参数引用的数组的后续更改不影响此实例
className - 此
OpenMBeanInfoSupport 实例描述的 open MBean 的完全限定的 Java 类名。
description - 此
OpenMBeanInfoSupport 实例描述的 open MBean 的可读描述。
openAttributes - 所描述的 open MBean 的公开属性的列表;必须是
MBeanAttributeInfo(通常为
OpenMBeanAttributeInfoSupport)的子类的实例组成的数组。
openConstructors - 所描述的 open MBean 的公开的公用构造方法的列表;必须是
MBeanConstructorInfo(通常为
OpenMBeanConstructorInfoSupport)的子类的实例组成的数组。
openOperations - 所描述的 open MBean 的公开操作的列表。必须是
MBeanOperationInfo(通常为
OpenMBeanOperationInfoSupport)的子类的实例组成的数组。
notifications - 所描述的 open MBean 发出的通知列表。
descriptor - MBean 的描述符。此参数可以为 null,等效于空描述符。
ArrayStoreException - 如果
openAttributes、
openConstructors、
openOperations 分别不是
MBeanAttributeInfo、
MBeanConstructorInfo、
MBeanOperationInfo 子类的实例组成的数组。
| 方法详细信息 |
|---|
public boolean equals(Object obj)
obj 参数与此
OpenMBeanInfoSupport 实例的相等性。
当且仅当下面的所有语句均为 true 时,才返回 true:
obj 为非 null,obj 还实现 OpenMBeanInfo 接口,equals 方法对作为
OpenMBeanInfo 接口的不同实现的
obj 参数正常工作。
OpenMBeanInfo 中的
equals
MBeanInfo 中的
equals
obj - 与此
OpenMBeanInfoSupport 实例进行相等性比较的对象;
OpenMBeanInfoSupport 实例,则返回
true。
Object.hashCode(),
Hashtable
public int hashCode()
返回此 OpenMBeanInfoSupport 实例的哈希码值。
OpenMBeanInfoSupport 实例的哈希码是在 equals 比较中使用的所有信息元素的哈希码的总和(即类名和关于属性、构造方法、操作和通知的信息,其中每个数组的 hashCode 都通过调用 new java.util.HashSet(java.util.Arrays.asList(this.getSignature)).hashCode() 来计算)。
这确保 t1.equals(t2) 意味着对于任何两个 OpenMBeanInfoSupport 实例 t1 和 t2 而言,都存在 t1.hashCode()==t2.hashCode(),这是方法 Object.hashCode() 的通用协定所要求的。
不过请注意,根据 equals(java.lang.Object) 中的定义,实现 OpenMBeanInfo 接口的类的其他实例可能与此 OpenMBeanInfoSupport 实例相等,但是如果它的计算方法不同,可能会有不同的哈希码。
由于 OpenMBeanInfoSupport 实例是不可变的,此实例的哈希码在首次调用 hashCode 时被计算,因此对后续调用返回相同的值。
OpenMBeanInfo 中的
hashCode
MBeanInfo 中的
hashCode
OpenMBeanInfoSupport 实例的哈希码值
Object.equals(java.lang.Object),
Hashtable
public String toString()
返回此 OpenMBeanInfoSupport 实例的字符串表示形式。
字符串表示形式由此类(即 javax.management.openmbean.OpenMBeanInfoSupport)的名称、MBean 类名、关于所描述 MBean 的属性、构造方法、操作、通知信息的字符串表示形式以及描述符的字符串表示形式组成。
由于 OpenMBeanInfoSupport 实例是不可变的,此实例的字符串表示形式在首次调用 toString 时被计算一次,然后对后续调用返回相同的值。
OpenMBeanInfo 中的
toString
MBeanInfo 中的
toString
OpenMBeanInfoSupport 实例的字符串表示形式
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。