| java.lang.Object javax.management.openmbean.OpenType
All known Subclasses: javax.management.openmbean.CompositeType, javax.management.openmbean.ArrayType, javax.management.openmbean.SimpleType, javax.management.openmbean.TabularType,
OpenType | abstract public class OpenType implements Serializable(Code) | | The OpenType class is the parent abstract class of all classes which describe the actual open type
of open data values.
An open type is defined by:
- the fully qualified Java class name of the open data values this type describes;
note that only a limited set of Java classes is allowed for open data values
(see
OpenType.ALLOWED_CLASSNAMES ALLOWED_CLASSNAMES ),
- its name,
- its description.
author: Young Yang |
Constructor Summary | |
protected | OpenType(String className, String typeName, String description) Constructs an OpenType instance (actually a subclass instance as OpenType is abstract),
checking for the validity of the given parameters. |
Method Summary | |
abstract public boolean | equals(Object obj) Compares the specified obj parameter with this
open type instance for equality.
Parameters: obj - the object to compare to. | public String | getClassName() Returns the fully qualified Java class name of the open data values this open type describes. | public String | getDescription() Returns the text description of this OpenType instance. | public String | getTypeName() Returns the name of this OpenType instance. | abstract public int | hashCode() | public boolean | isArray() Returns true if the open data values this open
type describes are arrays, false otherwise. | abstract public boolean | isValue(Object obj) Tests whether obj is a value for this open type.
Parameters: obj - the object to be tested for validity. | abstract public String | toString() Returns a string representation of this open type instance. |
ALLOWED_CLASSNAMES | final public static String[] ALLOWED_CLASSNAMES(Code) | | List of the fully qualified names of the Java classes allowed for open data values.
A multidimensional array of any one of these classes is also an allowed for open data values.
ALLOWED_CLASSNAMES = {
"java.lang.Void",
"java.lang.Boolean",
"java.lang.Character",
"java.lang.Byte",
"java.lang.Short",
"java.lang.Integer",
"java.lang.Long",
"java.lang.Float",
"java.lang.Double",
"java.lang.String",
"java.math.BigDecimal",
"java.math.BigInteger",
"java.util.Date",
"javax.management.ObjectName",
CompositeData.class.getNameSpace(),
TabularData.class.getNameSpace() } ;
|
BIGDECIMAL_CLASSNAME | final protected static String BIGDECIMAL_CLASSNAME(Code) | | |
BIGINTEGER_CLASSNAME | final protected static String BIGINTEGER_CLASSNAME(Code) | | |
BOOLEAN_CLASSNAME | final protected static String BOOLEAN_CLASSNAME(Code) | | |
BYTE_CLASSNAME | final protected static String BYTE_CLASSNAME(Code) | | |
CHARACTER_CLASSNAME | final protected static String CHARACTER_CLASSNAME(Code) | | |
COMPOSITEDATA_CLASSNAME | final protected static String COMPOSITEDATA_CLASSNAME(Code) | | |
DATE_CLASSNAME | final protected static String DATE_CLASSNAME(Code) | | |
DOUBLE_CLASSNAME | final protected static String DOUBLE_CLASSNAME(Code) | | |
FLOAT_CLASSNAME | final protected static String FLOAT_CLASSNAME(Code) | | |
INTEGER_CLASSNAME | final protected static String INTEGER_CLASSNAME(Code) | | |
LONG_CLASSNAME | final protected static String LONG_CLASSNAME(Code) | | |
OBJECTNAME_CLASSNAME | final protected static String OBJECTNAME_CLASSNAME(Code) | | |
SHORT_CLASSNAME | final protected static String SHORT_CLASSNAME(Code) | | |
STRING_CLASSNAME | final protected static String STRING_CLASSNAME(Code) | | |
TABULARDATA_CLASSNAME | final protected static String TABULARDATA_CLASSNAME(Code) | | |
VOID_CLASSNAME | final protected static String VOID_CLASSNAME(Code) | | |
OpenType | protected OpenType(String className, String typeName, String description) throws OpenDataException(Code) | | Constructs an OpenType instance (actually a subclass instance as OpenType is abstract),
checking for the validity of the given parameters.
The validity constraints are described below for each parameter.
Parameters: className - The fully qualified Java class name of the open data values this open type describes.The valid Java class names allowed for open data values are listed inOpenType.ALLOWED_CLASSNAMES ALLOWED_CLASSNAMES.A multidimensional array of any one of these classes is also an allowed class,in which case the class name follows the rules defined by the method getNameSpace of java.lang.Class .For example, a 3-dimensional array of Strings has for class name"[[[Ljava.lang.String; " (without the quotes). Parameters: typeName - The name given to the open type this instance represents; cannot be a null or empty string. Parameters: description - The human readable description of the open type this instance represents;cannot be a null or empty string. throws: IllegalArgumentException - if className, typeName or descriptionis a null or empty string throws: OpenDataException - if className is not one of the allowed Java class names for open data |
equals | abstract public boolean equals(Object obj)(Code) | | Compares the specified obj parameter with this
open type instance for equality.
Parameters: obj - the object to compare to. true if this object and obj are equal. |
getClassName | public String getClassName()(Code) | | Returns the fully qualified Java class name of the open data values this open type describes.
The only possible Java class names for open data values are listed in
OpenType.ALLOWED_CLASSNAMES ALLOWED_CLASSNAMES .
A multidimensional array of any one of these classes is also an allowed class,
in which case the class name follows the rules defined by the method
getNameSpace of java.lang.Class .
For example, a 3-dimensional array of Strings has for class name
"[[[Ljava.lang.String; " (without the quotes).
the class name. |
getDescription | public String getDescription()(Code) | | Returns the text description of this OpenType instance.
the description. |
getTypeName | public String getTypeName()(Code) | | Returns the name of this OpenType instance.
the type name. |
hashCode | abstract public int hashCode()(Code) | | |
isArray | public boolean isArray()(Code) | | Returns true if the open data values this open
type describes are arrays, false otherwise.
true if this is an array type. |
isValue | abstract public boolean isValue(Object obj)(Code) | | Tests whether obj is a value for this open type.
Parameters: obj - the object to be tested for validity. true if obj is a value for thisopen type, false otherwise. |
toString | abstract public String toString()(Code) | | Returns a string representation of this open type instance.
the string representation. |
|
|