< prev index next >
src/java.management/share/classes/javax/management/MBeanConstructorInfo.java
Print this page
*** 53,83 ****
* @serial The signature of the method, that is, the class names of the arguments.
*/
private final MBeanParameterInfo[] signature;
/**
! * Constructs an <CODE>MBeanConstructorInfo</CODE> object. The
* {@link Descriptor} of the constructed object will include
* fields contributed by any annotations on the {@code
* Constructor} object that contain the {@link DescriptorKey}
* meta-annotation.
*
* @param description A human readable description of the operation.
! * @param constructor The <CODE>java.lang.reflect.Constructor</CODE>
* object describing the MBean constructor.
*/
public MBeanConstructorInfo(String description, Constructor<?> constructor) {
this(constructor.getName(), description,
constructorSignature(constructor),
Introspector.descriptorForElement(constructor));
}
/**
! * Constructs an <CODE>MBeanConstructorInfo</CODE> object.
*
* @param name The name of the constructor.
! * @param signature <CODE>MBeanParameterInfo</CODE> objects
* describing the parameters(arguments) of the constructor. This
* may be null with the same effect as a zero-length array.
* @param description A human readable description of the constructor.
*/
public MBeanConstructorInfo(String name,
--- 53,83 ----
* @serial The signature of the method, that is, the class names of the arguments.
*/
private final MBeanParameterInfo[] signature;
/**
! * Constructs an {@code MBeanConstructorInfo} object. The
* {@link Descriptor} of the constructed object will include
* fields contributed by any annotations on the {@code
* Constructor} object that contain the {@link DescriptorKey}
* meta-annotation.
*
* @param description A human readable description of the operation.
! * @param constructor The {@code java.lang.reflect.Constructor}
* object describing the MBean constructor.
*/
public MBeanConstructorInfo(String description, Constructor<?> constructor) {
this(constructor.getName(), description,
constructorSignature(constructor),
Introspector.descriptorForElement(constructor));
}
/**
! * Constructs an {@code MBeanConstructorInfo} object.
*
* @param name The name of the constructor.
! * @param signature {@code MBeanParameterInfo} objects
* describing the parameters(arguments) of the constructor. This
* may be null with the same effect as a zero-length array.
* @param description A human readable description of the constructor.
*/
public MBeanConstructorInfo(String name,
*** 85,98 ****
MBeanParameterInfo[] signature) {
this(name, description, signature, null);
}
/**
! * Constructs an <CODE>MBeanConstructorInfo</CODE> object.
*
* @param name The name of the constructor.
! * @param signature <CODE>MBeanParameterInfo</CODE> objects
* describing the parameters(arguments) of the constructor. This
* may be null with the same effect as a zero-length array.
* @param description A human readable description of the constructor.
* @param descriptor The descriptor for the constructor. This may be null
* which is equivalent to an empty descriptor.
--- 85,98 ----
MBeanParameterInfo[] signature) {
this(name, description, signature, null);
}
/**
! * Constructs an {@code MBeanConstructorInfo} object.
*
* @param name The name of the constructor.
! * @param signature {@code MBeanParameterInfo} objects
* describing the parameters(arguments) of the constructor. This
* may be null with the same effect as a zero-length array.
* @param description A human readable description of the constructor.
* @param descriptor The descriptor for the constructor. This may be null
* which is equivalent to an empty descriptor.
*** 116,128 ****
}
/**
* <p>Returns a shallow clone of this instance. The clone is
! * obtained by simply calling <tt>super.clone()</tt>, thus calling
* the default native shallow cloning mechanism implemented by
! * <tt>Object.clone()</tt>. No deeper cloning of any internal
* field is made.</p>
*
* <p>Since this class is immutable, cloning is chiefly of
* interest to subclasses.</p>
*/
--- 116,128 ----
}
/**
* <p>Returns a shallow clone of this instance. The clone is
! * obtained by simply calling {@code super.clone()}, thus calling
* the default native shallow cloning mechanism implemented by
! * {@code Object.clone()}. No deeper cloning of any internal
* field is made.</p>
*
* <p>Since this class is immutable, cloning is chiefly of
* interest to subclasses.</p>
*/
*** 135,154 ****
}
}
/**
* <p>Returns the list of parameters for this constructor. Each
! * parameter is described by an <CODE>MBeanParameterInfo</CODE>
* object.</p>
*
* <p>The returned array is a shallow copy of the internal array,
* which means that it is a copy of the internal array of
! * references to the <CODE>MBeanParameterInfo</CODE> objects but
! * that each referenced <CODE>MBeanParameterInfo</CODE> object is
* not copied.</p>
*
! * @return An array of <CODE>MBeanParameterInfo</CODE> objects.
*/
public MBeanParameterInfo[] getSignature() {
if (signature.length == 0)
return signature;
else
--- 135,154 ----
}
}
/**
* <p>Returns the list of parameters for this constructor. Each
! * parameter is described by an {@code MBeanParameterInfo}
* object.</p>
*
* <p>The returned array is a shallow copy of the internal array,
* which means that it is a copy of the internal array of
! * references to the {@code MBeanParameterInfo} objects but
! * that each referenced {@code MBeanParameterInfo} object is
* not copied.</p>
*
! * @return An array of {@code MBeanParameterInfo} objects.
*/
public MBeanParameterInfo[] getSignature() {
if (signature.length == 0)
return signature;
else
*** 175,185 ****
/**
* Compare this MBeanConstructorInfo to another.
*
* @param o the object to compare to.
*
! * @return true if and only if <code>o</code> is an MBeanConstructorInfo such
* that its {@link #getName()}, {@link #getDescription()},
* {@link #getSignature()}, and {@link #getDescriptor()}
* values are equal (not necessarily
* identical) to those of this MBeanConstructorInfo. Two
* signature arrays are equal if their elements are pairwise
--- 175,185 ----
/**
* Compare this MBeanConstructorInfo to another.
*
* @param o the object to compare to.
*
! * @return true if and only if {@code o} is an MBeanConstructorInfo such
* that its {@link #getName()}, {@link #getDescription()},
* {@link #getSignature()}, and {@link #getDescriptor()}
* values are equal (not necessarily
* identical) to those of this MBeanConstructorInfo. Two
* signature arrays are equal if their elements are pairwise
< prev index next >