APIdia Launch Partner
Top Description Fields Constructors Methods
javax.management.modelmbean

public Class ModelMBeanConstructorInfo

extends MBeanConstructorInfo
implements DescriptorAccess
Class Inheritance
All Implemented Interfaces
javax.management.DescriptorAccess, javax.management.DescriptorRead
Static Imports
com.sun.jmx.defaults.JmxProperties.MODELMBEAN_LOGGER

The ModelMBeanConstructorInfo object describes a constructor of the ModelMBean. It is a subclass of MBeanConstructorInfo with the addition of an associated Descriptor and an implementation of the DescriptorAccess interface.

The fields in the descriptor are defined, but not limited to, the following. Note that when the Type in this table is Number, a String that is the decimal representation of a Long can also be used.

ModelMBeanConstructorInfo Fields
NameTypeMeaning
nameString Constructor name.
descriptorTypeString Must be "operation".
roleString Must be "constructor".
displayNameString Human readable name of constructor.
visibilityNumber 1-4 where 1: always visible 4: rarely visible.
presentationStringString XML formatted string to describe how to present operation

The persistPolicy and currencyTimeLimit fields are meaningless for constructors, but are not considered invalid.

The default descriptor will have the name, descriptorType, displayName and role fields.

The serialVersionUID of this class is 3862947819818064362L.

Since
1.5

Field Summary

Modifier and TypeField and Description
private Descriptor
private static final String
private static final ObjectStreamField[]
private static final long

Constructor Summary

AccessConstructor and Description
public
ModelMBeanConstructorInfo(String
A human readable description of the constructor.
description
,
Constructor<?>
The java.lang.reflect.Constructor object describing the MBean constructor.
constructorMethod
)

Constructs a ModelMBeanConstructorInfo object with a default descriptor.

public
ModelMBeanConstructorInfo(String
A human readable description of the constructor.
description
,
Constructor<?>
The java.lang.reflect.Constructor object describing the ModelMBean constructor.
constructorMethod
,
Descriptor
An instance of Descriptor containing the appropriate metadata for this instance of the ModelMBeanConstructorInfo. If it is null, then a default descriptor will be created. If the descriptor does not contain the field "displayName" this field is added in the descriptor with its default value.
descriptor
)

Constructs a ModelMBeanConstructorInfo object.

public
ModelMBeanConstructorInfo(String
The name of the constructor.
name
,
String
A human readable description of the constructor.
description
,
MBeanParameterInfo[]
MBeanParameterInfo object array describing the parameters(arguments) of the constructor.
signature
)

Constructs a ModelMBeanConstructorInfo object with a default descriptor.

public
ModelMBeanConstructorInfo(String
The name of the constructor.
name
,
String
A human readable description of the constructor.
description
,
MBeanParameterInfo[]
MBeanParameterInfo objects describing the parameters(arguments) of the constructor.
signature
,
Descriptor
An instance of Descriptor containing the appropriate metadata for this instance of the MBeanConstructorInfo. If it is null then a default descriptor will be created. If the descriptor does not contain the field "displayName" this field is added in the descriptor with its default value.
descriptor
)

Constructs a ModelMBeanConstructorInfo object.

pack-priv
ModelMBeanConstructorInfo(ModelMBeanConstructorInfo
the ModelMBeanConstructorInfo to be duplicated
old
)

Constructs a new ModelMBeanConstructorInfo object from this ModelMBeanConstructor Object.

Method Summary

Modifier and TypeMethod and Description
public Object
clone()

Overrides javax.management.MBeanConstructorInfo.clone.

Creates and returns a new ModelMBeanConstructorInfo which is a duplicate of this ModelMBeanConstructorInfo.

public Descriptor

Returns:

Descriptor associated with the ModelMBeanConstructorInfo object.
getDescriptor
()

Overrides javax.management.MBeanFeatureInfo.getDescriptor.

Implements javax.management.DescriptorRead.getDescriptor.

Returns a copy of the associated Descriptor.

private void
public void
setDescriptor(Descriptor
replaces the Descriptor associated with the ModelMBeanConstructor. If the descriptor does not contain all the following fields, the missing ones are added with their default values: displayName, name, role, descriptorType.
inDescriptor
)

Implements javax.management.DescriptorAccess.setDescriptor.

Sets associated Descriptor (full replace) of ModelMBeanConstructorInfo.

public String
toString()

Overrides javax.management.MBeanConstructorInfo.toString.

Returns a string containing the entire contents of the ModelMBeanConstructorInfo in human readable form.

private Descriptor
validDescriptor(final Descriptor
Descriptor to be checked, or null which is equivalent to an empty Descriptor.
in
)

Clones the passed in Descriptor, sets default values, and checks for validity.

private void
Inherited from javax.management.MBeanConstructorInfo:
equalsgetSignaturehashCode

Field Detail

consDescriptorback to summary
private Descriptor consDescriptor
currClassback to summary
private static final String currClass
serialPersistentFieldsback to summary
private static final ObjectStreamField[] serialPersistentFields
Serial Fields:
consDescriptor:Descriptor
The Descriptor containing the metadata for this instance
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.management.MBeanConstructorInfo.serialVersionUID.

Constructor Detail

ModelMBeanConstructorInfoback to summary
public ModelMBeanConstructorInfo(String description, Constructor<?> constructorMethod)

Constructs a ModelMBeanConstructorInfo object with a default descriptor. The Descriptor of the constructed object will include fields contributed by any annotations on the Constructor object that contain the DescriptorKey meta-annotation.

Parameters
description:String

A human readable description of the constructor.

constructorMethod:Constructor<?>

The java.lang.reflect.Constructor object describing the MBean constructor.

ModelMBeanConstructorInfoback to summary
public ModelMBeanConstructorInfo(String description, Constructor<?> constructorMethod, Descriptor descriptor)

Constructs a ModelMBeanConstructorInfo object. The Descriptor of the constructed object will include fields contributed by any annotations on the Constructor object that contain the DescriptorKey meta-annotation.

Parameters
description:String

A human readable description of the constructor.

constructorMethod:Constructor<?>

The java.lang.reflect.Constructor object describing the ModelMBean constructor.

descriptor:Descriptor

An instance of Descriptor containing the appropriate metadata for this instance of the ModelMBeanConstructorInfo. If it is null, then a default descriptor will be created. If the descriptor does not contain the field "displayName" this field is added in the descriptor with its default value.

Exceptions
RuntimeOperationsException:
Wraps an IllegalArgumentException. The descriptor is invalid, or descriptor field "name" is not equal to name parameter, or descriptor field "descriptorType" is not equal to "operation" or descriptor field "role" is present but not equal to "constructor".
ModelMBeanConstructorInfoback to summary
public ModelMBeanConstructorInfo(String name, String description, MBeanParameterInfo[] signature)

Constructs a ModelMBeanConstructorInfo object with a default descriptor.

Parameters
name:String

The name of the constructor.

description:String

A human readable description of the constructor.

signature:MBeanParameterInfo[]

MBeanParameterInfo object array describing the parameters(arguments) of the constructor.

ModelMBeanConstructorInfoback to summary
public ModelMBeanConstructorInfo(String name, String description, MBeanParameterInfo[] signature, Descriptor descriptor)

Constructs a ModelMBeanConstructorInfo object.

Parameters
name:String

The name of the constructor.

description:String

A human readable description of the constructor.

signature:MBeanParameterInfo[]

MBeanParameterInfo objects describing the parameters(arguments) of the constructor.

descriptor:Descriptor

An instance of Descriptor containing the appropriate metadata for this instance of the MBeanConstructorInfo. If it is null then a default descriptor will be created. If the descriptor does not contain the field "displayName" this field is added in the descriptor with its default value.

Exceptions
RuntimeOperationsException:
Wraps an IllegalArgumentException. The descriptor is invalid, or descriptor field "name" is not equal to name parameter, or descriptor field "descriptorType" is not equal to "operation" or descriptor field "role" is present but not equal to "constructor".
ModelMBeanConstructorInfoback to summary
pack-priv ModelMBeanConstructorInfo(ModelMBeanConstructorInfo old)

Constructs a new ModelMBeanConstructorInfo object from this ModelMBeanConstructor Object.

Parameters
old:ModelMBeanConstructorInfo

the ModelMBeanConstructorInfo to be duplicated

Method Detail

cloneback to summary
public Object clone()

Overrides javax.management.MBeanConstructorInfo.clone.

Creates and returns a new ModelMBeanConstructorInfo which is a duplicate of this ModelMBeanConstructorInfo.

Annotations
@Override
getDescriptorback to summary
public Descriptor getDescriptor()

Overrides javax.management.MBeanFeatureInfo.getDescriptor.

Implements javax.management.DescriptorRead.getDescriptor.

Returns a copy of the associated Descriptor.

Returns:Descriptor

Descriptor associated with the ModelMBeanConstructorInfo object.

Annotations
@Override
See Also
setDescriptor
readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException

Hides javax.management.MBeanFeatureInfo.readObject.

Deserializes a ModelMBeanConstructorInfo from an ObjectInputStream.

setDescriptorback to summary
public void setDescriptor(Descriptor inDescriptor)

Implements javax.management.DescriptorAccess.setDescriptor.

Sets associated Descriptor (full replace) of ModelMBeanConstructorInfo. If the new Descriptor is null, then the associated Descriptor reverts to a default descriptor. The Descriptor is validated before it is assigned. If the new Descriptor is invalid, then a RuntimeOperationsException wrapping an IllegalArgumentException is thrown.

Parameters
inDescriptor:Descriptor

replaces the Descriptor associated with the ModelMBeanConstructor. If the descriptor does not contain all the following fields, the missing ones are added with their default values: displayName, name, role, descriptorType.

Exceptions
RuntimeOperationsException:
Wraps an IllegalArgumentException. The descriptor is invalid, or descriptor field "name" is present but not equal to name parameter, or descriptor field "descriptorType" is present but not equal to "operation" or descriptor field "role" is present but not equal to "constructor".
See Also
getDescriptor
toStringback to summary
public String toString()

Overrides javax.management.MBeanConstructorInfo.toString.

Returns a string containing the entire contents of the ModelMBeanConstructorInfo in human readable form.

Annotations
@Override
validDescriptorback to summary
private Descriptor validDescriptor(final Descriptor in) throws RuntimeOperationsException

Clones the passed in Descriptor, sets default values, and checks for validity. If the Descriptor is invalid (for instance by having the wrong "name"), this indicates programming error and a RuntimeOperationsException will be thrown. The following fields will be defaulted if they are not already set: displayName=this.getName(), name=this.getName(), descriptorType="operation", role="constructor"

Parameters
in:Descriptor

Descriptor to be checked, or null which is equivalent to an empty Descriptor.

Exceptions
RuntimeOperationsException:
if Descriptor is invalid
writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException

Hides javax.management.MBeanFeatureInfo.writeObject.

Serializes a ModelMBeanConstructorInfo to an ObjectOutputStream.