类 ModelMBeanConstructorInfo

所有已实现的接口:
Serializable , Cloneable , DescriptorAccess , DescriptorRead

public class ModelMBeanConstructorInfo extends MBeanConstructorInfo implements DescriptorAccess

ModelMBeanConstructorInfo 对象描述了 ModelMBean 的构造方法。它是 MBeanConstructorInfo 的子类,添加了关联的 Descriptor 和 DescriptorAccess 接口的实现。

描述符中的字段定义如下,但不限于以下内容。请注意,当此表中的 Type 为 Number 时,也可以使用作为 Long 的十进制表示形式的 String。

ModelMBeanConstructorInfo 字段
Name Type 意义
name String 构造方法名称。
描述符类型 String 必须是“操作”。
角色 String 必须是“构造方法”。
显示名称 String 构造方法的人类可读名称。
能见度 Number 1-4 其中 1:总是可见 4:很少可见。
演示字符串 String XML 格式的字符串来描述如何呈现操作

persistPolicycurrencyTimeLimit 字段对构造函数没有意义,但不被视为无效。

默认描述符将具有 name descriptorTypedisplayNamerole 字段。

serialVersionUID这个类的是3862947819818064362L

自从:
1.5
参见:
  • 构造方法详细信息

    • ModelMBeanConstructorInfo

      public ModelMBeanConstructorInfo(String  description, 构造方法 <?> constructorMethod)
      使用默认描述符构造一个 ModelMBeanConstructorInfo 对象。构造对象的 Descriptor 将包括由包含 DescriptorKey 元注释的 Constructor 对象上的任何注释提供的字段。
      参数:
      description - 构造函数的人类可读描述。
      constructorMethod - 描述 MBean 构造函数的 java.lang.reflect.Constructor 对象。
    • ModelMBeanConstructorInfo

      public ModelMBeanConstructorInfo(String  description, 构造方法 <?> constructorMethod, Descriptor  descriptor)
      构造一个 ModelMBeanConstructorInfo 对象。构造对象的 Descriptor 将包括由包含 DescriptorKey 元注释的 Constructor 对象上的任何注释提供的字段。
      参数:
      description - 构造函数的人类可读描述。
      constructorMethod - 描述 ModelMBean 构造函数的 java.lang.reflect.Constructor 对象。
      descriptor - Descriptor 的一个实例,包含此 ModelMBeanConstructorInfo 实例的适当元数据。如果为空,则将创建默认描述符。如果描述符不包含字段“displayName”,则此字段将添加到具有默认值的描述符中。
      抛出:
      RuntimeOperationsException - 包装 IllegalArgumentException。描述符无效,或者描述符字段“name”不等于名称参数,或者描述符字段“descriptorType”不等于“operation”,或者描述符字段“role”存在但不等于“constructor”。
    • ModelMBeanConstructorInfo

      public ModelMBeanConstructorInfo(String  name, String  description, MBeanParameterInfo [] signature)
      使用默认描述符构造一个 ModelMBeanConstructorInfo 对象。
      参数:
      name - 构造函数的名称。
      description - 构造函数的人类可读描述。
      signature - 描述构造函数参数的 MBeanParameterInfo 对象数组。
    • ModelMBeanConstructorInfo

      public ModelMBeanConstructorInfo(String  name, String  description, MBeanParameterInfo [] signature, Descriptor  descriptor)
      构造一个 ModelMBeanConstructorInfo 对象。
      参数:
      name - 构造函数的名称。
      description - 构造函数的人类可读描述。
      signature - 描述构造函数参数的 MBeanParameterInfo 对象。
      descriptor - Descriptor 的一个实例,包含此 MBeanConstructorInfo 实例的适当元数据。如果它为 null,则将创建一个默认描述符。如果描述符不包含字段“displayName”,则此字段将添加到具有默认值的描述符中。
      抛出:
      RuntimeOperationsException - 包装 IllegalArgumentException。描述符无效,或者描述符字段“name”不等于名称参数,或者描述符字段“descriptorType”不等于“operation”,或者描述符字段“role”存在但不等于“constructor”。
  • 方法详情

    • clone

      public Object  clone()
      创建并返回一个新的 ModelMBeanConstructorInfo,它是此 ModelMBeanConstructorInfo 的副本。
      重写:
      clone 在类 MBeanConstructorInfo
      返回:
      此实例的克隆。
      参见:
    • getDescriptor

      public Descriptor  getDescriptor()
      返回关联描述符的副本。
      指定者:
      getDescriptor 在接口 DescriptorRead
      重写:
      getDescriptor 在类 MBeanFeatureInfo
      返回:
      与 ModelMBeanConstructorInfo 对象关联的描述符。
      参见:
    • setDescriptor

      public void setDescriptor(Descriptor  inDescriptor)
      设置 ModelMBeanConstructorInfo 的关联描述符(完全替换)。如果新的 Descriptor 为空,则关联的 Descriptor 恢复为默认描述符。描述符在分配之前经过验证。如果新的 Descriptor 无效,则抛出包含 IllegalArgumentException 的 RuntimeOperationsException。
      指定者:
      setDescriptor 在接口 DescriptorAccess
      参数:
      inDescriptor - 替换与 ModelMBeanConstructor 关联的描述符。如果描述符不包含以下所有字段,则添加缺少的字段及其默认值:displayName、name、role、descriptorType。
      抛出:
      RuntimeOperationsException - 包装 IllegalArgumentException。描述符无效,或描述符字段“name”存在但不等于名称参数,或描述符字段“descriptorType”存在但不等于“operation”或描述符字段“role”存在但不等于“constructor” .
      参见:
    • toString

      public String  toString()
      返回一个字符串,其中包含人类可读形式的 ModelMBeanConstructorInfo 的全部内容。
      重写:
      toString 在类 Object
      返回:
      对象的字符串表示形式。