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

public Class OpenMBeanParameterInfoSupport

extends MBeanParameterInfo
implements OpenMBeanParameterInfo
Class Inheritance
All Implemented Interfaces
javax.management.openmbean.OpenMBeanParameterInfo
Imports
java.util.Set, javax.management.Descriptor, .DescriptorRead, .ImmutableDescriptor, .MBeanParameterInfo

Describes a parameter used in one or more operations or constructors of an open MBean.
Since
1.5

Field Summary

Modifier and TypeField and Description
private Object
private Set<?>
private Comparable<?>
private Comparable<?>
private transient Integer
private transient String
private OpenType<?>
pack-priv static final long

Constructor Summary

AccessConstructor and Description
public
OpenMBeanParameterInfoSupport(String
cannot be a null or empty string.
name
,
String
cannot be a null or empty string.
description
,
OpenType<?>
cannot be null.
openType
)

Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType and description.

public
OpenMBeanParameterInfoSupport(String
cannot be a null or empty string.
name
,
String
cannot be a null or empty string.
description
,
OpenType<?>
cannot be null.
openType
,
Descriptor
The descriptor for the parameter. This may be null which is equivalent to an empty descriptor.
descriptor
)

Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType, description, and descriptor.

public <
allows the compiler to check that the defaultValue, if non-null, has the correct Java type for the given openType.
T
>
OpenMBeanParameterInfoSupport(String
cannot be a null or empty string.
name
,
String
cannot be a null or empty string.
description
,
OpenType<T>
cannot be null.
openType
,
T
must be a valid value for the openType specified for this parameter; default value not supported for ArrayType and TabularType; can be null, in which case it means that no default value is set.
defaultValue
)

Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType, description and defaultValue.

public <
allows the compiler to check that the defaultValue and legalValues, if non-null, have the correct Java type for the given openType.
T
>
OpenMBeanParameterInfoSupport(String
cannot be a null or empty string.
name
,
String
cannot be a null or empty string.
description
,
OpenType<T>
cannot be null.
openType
,
T
must be a valid value for the openType specified for this parameter; default value not supported for ArrayType and TabularType; can be null, in which case it means that no default value is set.
defaultValue
,
T[]
each contained value must be valid for the openType specified for this parameter; legal values not supported for ArrayType and TabularType; can be null or empty.
legalValues
)

Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType, description, defaultValue and legalValues.

public <
allows the compiler to check that the defaultValue, minValue, and maxValue, if non-null, have the correct Java type for the given openType.
T
>
OpenMBeanParameterInfoSupport(String
cannot be a null or empty string.
name
,
String
cannot be a null or empty string.
description
,
OpenType<T>
cannot be null.
openType
,
T
must be a valid value for the openType specified for this parameter; default value not supported for ArrayType and TabularType; can be null, in which case it means that no default value is set.
defaultValue
,
Comparable<T>
must be valid for the openType specified for this parameter; can be null, in which case it means that no minimal value is set.
minValue
,
Comparable<T>
must be valid for the openType specified for this parameter; can be null, in which case it means that no maximal value is set.
maxValue
)

Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType, description, defaultValue, minValue and maxValue.

private <T>
OpenMBeanParameterInfoSupport(String name, String description, OpenType<T> openType, T defaultValue, T[] legalValues, Comparable<T> minValue, Comparable<T> maxValue)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the specified object is equal to this OpenMBeanParameterInfoSupport instance.
equals
(Object
the object to be compared for equality with this OpenMBeanParameterInfoSupport instance.
obj
)

Overrides javax.management.MBeanParameterInfo.equals.

Implements javax.management.openmbean.OpenMBeanParameterInfo.equals.

Compares the specified obj parameter with this OpenMBeanParameterInfoSupport instance for equality.

public Object
getDefaultValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.getDefaultValue.

Returns the default value for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.

public Set<?>
getLegalValues()

Implements javax.management.openmbean.OpenMBeanParameterInfo.getLegalValues.

Returns an unmodifiable Set of legal values for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.

public Comparable<?>
getMaxValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.getMaxValue.

Returns the maximal value for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.

public Comparable<?>
getMinValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.getMinValue.

Returns the minimal value for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.

public OpenType<?>
getOpenType()

Implements javax.management.openmbean.OpenMBeanParameterInfo.getOpenType.

Returns the open type for the values of the parameter described by this OpenMBeanParameterInfoSupport instance.

public boolean
hasDefaultValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.hasDefaultValue.

Returns true if this OpenMBeanParameterInfoSupport instance specifies a non-null default value for the described parameter, false otherwise.

public int

Returns:

the hash code value for this OpenMBeanParameterInfoSupport instance
hashCode
()

Overrides javax.management.MBeanParameterInfo.hashCode.

Implements javax.management.openmbean.OpenMBeanParameterInfo.hashCode.

Returns the hash code value for this OpenMBeanParameterInfoSupport instance.

public boolean
hasLegalValues()

Implements javax.management.openmbean.OpenMBeanParameterInfo.hasLegalValues.

Returns true if this OpenMBeanParameterInfoSupport instance specifies a non-null set of legal values for the described parameter, false otherwise.

public boolean
hasMaxValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.hasMaxValue.

Returns true if this OpenMBeanParameterInfoSupport instance specifies a non-null maximal value for the described parameter, false otherwise.

public boolean
hasMinValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.hasMinValue.

Returns true if this OpenMBeanParameterInfoSupport instance specifies a non-null minimal value for the described parameter, false otherwise.

public boolean

Returns:

true if obj is a valid value for the parameter described by this OpenMBeanParameterInfo instance, false otherwise.
isValue
(Object
the object to be tested.
obj
)

Implements javax.management.openmbean.OpenMBeanParameterInfo.isValue.

Tests whether obj is a valid value for the parameter described by this OpenMBeanParameterInfo instance.

private Object
readResolve()

An object serialized in a version of the API before Descriptors were added to this class will have an empty or null Descriptor.

public String

Returns:

a string representation of this OpenMBeanParameterInfoSupport instance.
toString
()

Overrides javax.management.MBeanParameterInfo.toString.

Implements javax.management.openmbean.OpenMBeanParameterInfo.toString.

Returns a string representation of this OpenMBeanParameterInfoSupport instance.

Inherited from javax.management.MBeanParameterInfo:
clonegetType

Field Detail

defaultValueback to summary
private Object defaultValue
Annotations
@SuppressWarnings:serial
legalValuesback to summary
private Set<?> legalValues
Annotations
@SuppressWarnings:serial
maxValueback to summary
private Comparable<?> maxValue
Annotations
@SuppressWarnings:serial
minValueback to summary
private Comparable<?> minValue
Annotations
@SuppressWarnings:serial
myHashCodeback to summary
private transient Integer myHashCode
myToStringback to summary
private transient String myToString
openTypeback to summary
private OpenType<?> openType
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides javax.management.MBeanParameterInfo.serialVersionUID.

Constructor Detail

OpenMBeanParameterInfoSupportback to summary
public OpenMBeanParameterInfoSupport(String name, String description, OpenType<?> openType)

Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType and description.

Parameters
name:String

cannot be a null or empty string.

description:String

cannot be a null or empty string.

openType:OpenType<?>

cannot be null.

Exceptions
IllegalArgumentException:
if name or description are null or empty string, or openType is null.
OpenMBeanParameterInfoSupportback to summary
public OpenMBeanParameterInfoSupport(String name, String description, OpenType<?> openType, Descriptor descriptor)

Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType, description, and descriptor.

The descriptor can contain entries that will define the values returned by certain methods of this class, as explained in the package description.

Parameters
name:String

cannot be a null or empty string.

description:String

cannot be a null or empty string.

openType:OpenType<?>

cannot be null.

descriptor:Descriptor

The descriptor for the parameter. This may be null which is equivalent to an empty descriptor.

Exceptions
IllegalArgumentException:
if name or description are null or empty string, or openType is null, or the descriptor entries are invalid as described in the package description.
Since
1.6
OpenMBeanParameterInfoSupportback to summary
public <T> OpenMBeanParameterInfoSupport(String name, String description, OpenType<T> openType, T defaultValue) throws OpenDataException

Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType, description and defaultValue.

Parameters
<T>
allows the compiler to check that the defaultValue, if non-null, has the correct Java type for the given openType.
name:String

cannot be a null or empty string.

description:String

cannot be a null or empty string.

openType:OpenType<T>

cannot be null.

defaultValue:T

must be a valid value for the openType specified for this parameter; default value not supported for ArrayType and TabularType; can be null, in which case it means that no default value is set.

Exceptions
OpenDataException:
if defaultValue is not a valid value for the specified openType, or defaultValue is non null and openType is an ArrayType or a TabularType.
IllegalArgumentException:
if name or description are null or empty string, or openType is null.
OpenMBeanParameterInfoSupportback to summary
public <T> OpenMBeanParameterInfoSupport(String name, String description, OpenType<T> openType, T defaultValue, T[] legalValues) throws OpenDataException

Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType, description, defaultValue and legalValues.

The contents of legalValues are copied, so subsequent modifications of the array referenced by legalValues have no impact on this OpenMBeanParameterInfoSupport instance.

Parameters
<T>
allows the compiler to check that the defaultValue and legalValues, if non-null, have the correct Java type for the given openType.
name:String

cannot be a null or empty string.

description:String

cannot be a null or empty string.

openType:OpenType<T>

cannot be null.

defaultValue:T

must be a valid value for the openType specified for this parameter; default value not supported for ArrayType and TabularType; can be null, in which case it means that no default value is set.

legalValues:T[]

each contained value must be valid for the openType specified for this parameter; legal values not supported for ArrayType and TabularType; can be null or empty.

Exceptions
OpenDataException:
if defaultValue is not a valid value for the specified openType, or one value in legalValues is not valid for the specified openType, or defaultValue is non null and openType is an ArrayType or a TabularType, or legalValues is non null and non empty and openType is an ArrayType or a TabularType, or legalValues is non null and non empty and defaultValue is not contained in legalValues.
IllegalArgumentException:
if name or description are null or empty string, or openType is null.
OpenMBeanParameterInfoSupportback to summary
public <T> OpenMBeanParameterInfoSupport(String name, String description, OpenType<T> openType, T defaultValue, Comparable<T> minValue, Comparable<T> maxValue) throws OpenDataException

Constructs an OpenMBeanParameterInfoSupport instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified name, openType, description, defaultValue, minValue and maxValue. It is possible to specify minimal and maximal values only for an open type whose values are Comparable.

Parameters
<T>
allows the compiler to check that the defaultValue, minValue, and maxValue, if non-null, have the correct Java type for the given openType.
name:String

cannot be a null or empty string.

description:String

cannot be a null or empty string.

openType:OpenType<T>

cannot be null.

defaultValue:T

must be a valid value for the openType specified for this parameter; default value not supported for ArrayType and TabularType; can be null, in which case it means that no default value is set.

minValue:Comparable<T>

must be valid for the openType specified for this parameter; can be null, in which case it means that no minimal value is set.

maxValue:Comparable<T>

must be valid for the openType specified for this parameter; can be null, in which case it means that no maximal value is set.

Exceptions
OpenDataException:
if defaultValue, minValue or maxValue is not a valid value for the specified openType, or defaultValue is non null and openType is an ArrayType or a TabularType, or both minValue and maxValue are non-null and minValue.compareTo(maxValue) > 0 is true, or both defaultValue and minValue are non-null and minValue.compareTo(defaultValue) > 0 is true, or both defaultValue and maxValue are non-null and defaultValue.compareTo(maxValue) > 0 is true.
IllegalArgumentException:
if name or description are null or empty string, or openType is null.
OpenMBeanParameterInfoSupportback to summary
private <T> OpenMBeanParameterInfoSupport(String name, String description, OpenType<T> openType, T defaultValue, T[] legalValues, Comparable<T> minValue, Comparable<T> maxValue) throws OpenDataException

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides javax.management.MBeanParameterInfo.equals.

Implements javax.management.openmbean.OpenMBeanParameterInfo.equals.

Compares the specified obj parameter with this OpenMBeanParameterInfoSupport instance for equality.

Returns true if and only if all of the following statements are true:

  • obj is non null,
  • obj also implements the OpenMBeanParameterInfo interface,
  • their names are equal
  • their open types are equal
  • their default, min, max and legal values are equal.
This ensures that this equals method works properly for obj parameters which are different implementations of the OpenMBeanParameterInfo interface.

If obj also implements DescriptorRead, then its getDescriptor() method must also return the same value as for this object.

Parameters
obj:Object

the object to be compared for equality with this OpenMBeanParameterInfoSupport instance.

Returns:boolean

true if the specified object is equal to this OpenMBeanParameterInfoSupport instance.

getDefaultValueback to summary
public Object getDefaultValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.getDefaultValue.

Returns the default value for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.

getLegalValuesback to summary
public Set<?> getLegalValues()

Implements javax.management.openmbean.OpenMBeanParameterInfo.getLegalValues.

Returns an unmodifiable Set of legal values for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.

getMaxValueback to summary
public Comparable<?> getMaxValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.getMaxValue.

Returns the maximal value for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.

getMinValueback to summary
public Comparable<?> getMinValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.getMinValue.

Returns the minimal value for the parameter described by this OpenMBeanParameterInfoSupport instance, if specified, or null otherwise.

getOpenTypeback to summary
public OpenType<?> getOpenType()

Implements javax.management.openmbean.OpenMBeanParameterInfo.getOpenType.

Returns the open type for the values of the parameter described by this OpenMBeanParameterInfoSupport instance.

hasDefaultValueback to summary
public boolean hasDefaultValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.hasDefaultValue.

Returns true if this OpenMBeanParameterInfoSupport instance specifies a non-null default value for the described parameter, false otherwise.

hashCodeback to summary
public int hashCode()

Overrides javax.management.MBeanParameterInfo.hashCode.

Implements javax.management.openmbean.OpenMBeanParameterInfo.hashCode.

Returns the hash code value for this OpenMBeanParameterInfoSupport instance.

The hash code of an OpenMBeanParameterInfoSupport instance is the sum of the hash codes of all elements of information used in equals comparisons (ie: its name, its open type, its default, min, max and legal values, and its Descriptor).

This ensures that t1.equals(t2) implies that t1.hashCode()==t2.hashCode() for any two OpenMBeanParameterInfoSupport instances t1 and t2, as required by the general contract of the method Object.hashCode().

However, note that another instance of a class implementing the OpenMBeanParameterInfo interface may be equal to this OpenMBeanParameterInfoSupport instance as defined by equals(java.lang.Object), but may have a different hash code if it is calculated differently.

As OpenMBeanParameterInfoSupport instances are immutable, the hash code for this instance is calculated once, on the first call to hashCode, and then the same value is returned for subsequent calls.

Returns:int

the hash code value for this OpenMBeanParameterInfoSupport instance

hasLegalValuesback to summary
public boolean hasLegalValues()

Implements javax.management.openmbean.OpenMBeanParameterInfo.hasLegalValues.

Returns true if this OpenMBeanParameterInfoSupport instance specifies a non-null set of legal values for the described parameter, false otherwise.

hasMaxValueback to summary
public boolean hasMaxValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.hasMaxValue.

Returns true if this OpenMBeanParameterInfoSupport instance specifies a non-null maximal value for the described parameter, false otherwise.

hasMinValueback to summary
public boolean hasMinValue()

Implements javax.management.openmbean.OpenMBeanParameterInfo.hasMinValue.

Returns true if this OpenMBeanParameterInfoSupport instance specifies a non-null minimal value for the described parameter, false otherwise.

isValueback to summary
public boolean isValue(Object obj)

Implements javax.management.openmbean.OpenMBeanParameterInfo.isValue.

Tests whether obj is a valid value for the parameter described by this OpenMBeanParameterInfo instance.

Parameters
obj:Object

the object to be tested.

Returns:boolean

true if obj is a valid value for the parameter described by this OpenMBeanParameterInfo instance, false otherwise.

readResolveback to summary
private Object readResolve()

An object serialized in a version of the API before Descriptors were added to this class will have an empty or null Descriptor. For consistency with our behavior in this version, we must replace the object with one where the Descriptors reflect the same values of openType, defaultValue, etc.

toStringback to summary
public String toString()

Overrides javax.management.MBeanParameterInfo.toString.

Implements javax.management.openmbean.OpenMBeanParameterInfo.toString.

Returns a string representation of this OpenMBeanParameterInfoSupport instance.

The string representation consists of the name of this class (i.e. javax.management.openmbean.OpenMBeanParameterInfoSupport), the string representation of the name and open type of the described parameter, the string representation of its default, min, max and legal values and the string representation of its descriptor.

As OpenMBeanParameterInfoSupport instances are immutable, the string representation for this instance is calculated once, on the first call to toString, and then the same value is returned for subsequent calls.

Returns:String

a string representation of this OpenMBeanParameterInfoSupport instance.