- All Implemented Interfaces:
Serializable
SimpleType
class is the open type class whose instances describe
all open data values which are neither arrays,
nor CompositeData
values,
nor TabularData
values.
It predefines all its possible instances as static fields, and has no public constructor.
Given a SimpleType
instance describing values whose Java class name is className,
the internal fields corresponding to the name and description of this SimpleType
instance
are also set to className.
In other words, its methods getClassName
, getTypeName
and getDescription
all return the same string value className.
- Since:
- 1.5
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final SimpleType<BigDecimal>
TheSimpleType
instance describing values whose Java class name isjava.math.BigDecimal
.static final SimpleType<BigInteger>
TheSimpleType
instance describing values whose Java class name isjava.math.BigInteger
.static final SimpleType<Boolean>
TheSimpleType
instance describing values whose Java class name isjava.lang.Boolean
.static final SimpleType<Byte>
TheSimpleType
instance describing values whose Java class name isjava.lang.Byte
.static final SimpleType<Character>
TheSimpleType
instance describing values whose Java class name isjava.lang.Character
.static final SimpleType<Date>
TheSimpleType
instance describing values whose Java class name isjava.util.Date
.static final SimpleType<Double>
TheSimpleType
instance describing values whose Java class name isjava.lang.Double
.static final SimpleType<Float>
TheSimpleType
instance describing values whose Java class name isjava.lang.Float
.static final SimpleType<Integer>
TheSimpleType
instance describing values whose Java class name isjava.lang.Integer
.static final SimpleType<Long>
TheSimpleType
instance describing values whose Java class name isjava.lang.Long
.static final SimpleType<ObjectName>
TheSimpleType
instance describing values whose Java class name isjavax.management.ObjectName
.static final SimpleType<Short>
TheSimpleType
instance describing values whose Java class name isjava.lang.Short
.static final SimpleType<String>
TheSimpleType
instance describing values whose Java class name isjava.lang.String
.static final SimpleType<Void>
TheSimpleType
instance describing values whose Java class name isjava.lang.Void
.Fields declared in class javax.management.openmbean.OpenType
ALLOWED_CLASSNAMES, ALLOWED_CLASSNAMES_LIST
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the specifiedobj
parameter with thisSimpleType
instance for equality.int
hashCode()
Returns the hash code value for thisSimpleType
instance.boolean
Tests whether obj is a value for thisSimpleType
instance.Replace an object read from anObjectInputStream
with the unique instance for that value.toString()
Returns a string representation of thisSimpleType
instance.Methods declared in class javax.management.openmbean.OpenType
getClassName, getDescription, getTypeName, isArray
-
Field Details
-
VOID
TheSimpleType
instance describing values whose Java class name isjava.lang.Void
. -
BOOLEAN
TheSimpleType
instance describing values whose Java class name isjava.lang.Boolean
. -
CHARACTER
TheSimpleType
instance describing values whose Java class name isjava.lang.Character
. -
BYTE
TheSimpleType
instance describing values whose Java class name isjava.lang.Byte
. -
SHORT
TheSimpleType
instance describing values whose Java class name isjava.lang.Short
. -
INTEGER
TheSimpleType
instance describing values whose Java class name isjava.lang.Integer
. -
LONG
TheSimpleType
instance describing values whose Java class name isjava.lang.Long
. -
FLOAT
TheSimpleType
instance describing values whose Java class name isjava.lang.Float
. -
DOUBLE
TheSimpleType
instance describing values whose Java class name isjava.lang.Double
. -
STRING
TheSimpleType
instance describing values whose Java class name isjava.lang.String
. -
BIGDECIMAL
TheSimpleType
instance describing values whose Java class name isjava.math.BigDecimal
. -
BIGINTEGER
TheSimpleType
instance describing values whose Java class name isjava.math.BigInteger
. -
DATE
TheSimpleType
instance describing values whose Java class name isjava.util.Date
. -
OBJECTNAME
TheSimpleType
instance describing values whose Java class name isjavax.management.ObjectName
.
-
-
Method Details
-
isValue
Tests whether obj is a value for thisSimpleType
instance.This method returns
true
if and only if obj is not null and obj's class name is the same as the className field defined for thisSimpleType
instance (ie the class name returned by thegetClassName
method). -
equals
Compares the specifiedobj
parameter with thisSimpleType
instance for equality.Two
SimpleType
instances are equal if and only if theirgetClassName
methods return the same value. -
hashCode
public int hashCode()Returns the hash code value for thisSimpleType
instance. The hash code of aSimpleType
instance is the hash code of the string value returned by thegetClassName
method.As
SimpleType
instances are immutable, the hash code for this instance is calculated once, on the first call tohashCode
, and then the same value is returned for subsequent calls. -
toString
Returns a string representation of thisSimpleType
instance.The string representation consists of the name of this class (ie
javax.management.openmbean.SimpleType
) and the type name for this instance (which is the java class name of the values thisSimpleType
instance represents).As
SimpleType
instances are immutable, the string representation for this instance is calculated once, on the first call totoString
, and then the same value is returned for subsequent calls. -
readResolve
Replace an object read from anObjectInputStream
with the unique instance for that value.- Returns:
- the replacement object.
- Throws:
ObjectStreamException
- if the read object cannot be resolved.
-