Top Description Fields Constructors Methods
javax.management.openmbean

public final Class SimpleType<T>

extends OpenType<T>
Class Inheritance
Type Parameters
<T>
the Java type that values described by this SimpleType must have.
Imports
java.io.InvalidObjectException, .ObjectStreamException, java.math.BigDecimal, .BigInteger, java.util.Date, .Map, .HashMap, javax.management.ObjectName

The 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

Field Summary

Modifier and TypeField and Description
public static final SimpleType<BigDecimal>
BIGDECIMAL

The SimpleType instance describing values whose Java class name is java.math.BigDecimal.

public static final SimpleType<BigInteger>
BIGINTEGER

The SimpleType instance describing values whose Java class name is java.math.BigInteger.

public static final SimpleType<Boolean>
BOOLEAN

The SimpleType instance describing values whose Java class name is java.lang.Boolean.

public static final SimpleType<Byte>
BYTE

The SimpleType instance describing values whose Java class name is java.lang.Byte.

private static final Map<SimpleType<?>, SimpleType<?>>
public static final SimpleType<Character>
CHARACTER

The SimpleType instance describing values whose Java class name is java.lang.Character.

public static final SimpleType<Date>
DATE

The SimpleType instance describing values whose Java class name is java.util.Date.

public static final SimpleType<Double>
DOUBLE

The SimpleType instance describing values whose Java class name is java.lang.Double.

public static final SimpleType<Float>
FLOAT

The SimpleType instance describing values whose Java class name is java.lang.Float.

public static final SimpleType<Integer>
INTEGER

The SimpleType instance describing values whose Java class name is java.lang.Integer.

public static final SimpleType<Long>
LONG

The SimpleType instance describing values whose Java class name is java.lang.Long.

private transient Integer
private transient String
public static final SimpleType<ObjectName>
OBJECTNAME

The SimpleType instance describing values whose Java class name is javax.management.ObjectName.

pack-priv static final long
public static final SimpleType<Short>
SHORT

The SimpleType instance describing values whose Java class name is java.lang.Short.

public static final SimpleType<String>
STRING

The SimpleType instance describing values whose Java class name is java.lang.String.

private static final SimpleType<?>[]
public static final SimpleType<Void>
VOID

The SimpleType instance describing values whose Java class name is java.lang.Void.

Inherited from javax.management.openmbean.OpenType:
ALLOWED_CLASSNAMESALLOWED_CLASSNAMES_LIST

Constructor Summary

AccessConstructor and Description
private
SimpleType(Class<T> valueClass)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the specified object is equal to this SimpleType instance.
equals
(Object
the object to be compared for equality with this SimpleType instance; if obj is null or is not an instance of the class SimpleType, equals returns false.
obj
)

Implements abstract javax.management.openmbean.OpenType.equals.

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

public int

Returns:

the hash code value for this SimpleType instance
hashCode
()

Implements abstract javax.management.openmbean.OpenType.hashCode.

Returns the hash code value for this SimpleType instance.

public boolean

Returns:

true if obj is a value for this SimpleType instance.
isValue
(Object
the object to be tested.
obj
)

Implements abstract javax.management.openmbean.OpenType.isValue.

Tests whether obj is a value for this SimpleType instance.

public Object

Returns:

the replacement object.
readResolve
()

Replace an object read from an java.io.ObjectInputStream with the unique instance for that value.

public String

Returns:

a string representation of this SimpleType instance
toString
()

Implements abstract javax.management.openmbean.OpenType.toString.

Returns a string representation of this SimpleType instance.

Inherited from javax.management.openmbean.OpenType:
getClassNamegetDescriptiongetDescriptorgetTypeNameisArrayisAssignableFromsafeGetClassName

Field Detail

BIGDECIMALback to summary
public static final SimpleType<BigDecimal> BIGDECIMAL

The SimpleType instance describing values whose Java class name is java.math.BigDecimal.

BIGINTEGERback to summary
public static final SimpleType<BigInteger> BIGINTEGER

The SimpleType instance describing values whose Java class name is java.math.BigInteger.

BOOLEANback to summary
public static final SimpleType<Boolean> BOOLEAN

The SimpleType instance describing values whose Java class name is java.lang.Boolean.

BYTEback to summary
public static final SimpleType<Byte> BYTE

The SimpleType instance describing values whose Java class name is java.lang.Byte.

canonicalTypesback to summary
private static final Map<SimpleType<?>, SimpleType<?>> canonicalTypes
CHARACTERback to summary
public static final SimpleType<Character> CHARACTER

The SimpleType instance describing values whose Java class name is java.lang.Character.

DATEback to summary
public static final SimpleType<Date> DATE

The SimpleType instance describing values whose Java class name is java.util.Date.

DOUBLEback to summary
public static final SimpleType<Double> DOUBLE

The SimpleType instance describing values whose Java class name is java.lang.Double.

FLOATback to summary
public static final SimpleType<Float> FLOAT

The SimpleType instance describing values whose Java class name is java.lang.Float.

INTEGERback to summary
public static final SimpleType<Integer> INTEGER

The SimpleType instance describing values whose Java class name is java.lang.Integer.

LONGback to summary
public static final SimpleType<Long> LONG

The SimpleType instance describing values whose Java class name is java.lang.Long.

myHashCodeback to summary
private transient Integer myHashCode
myToStringback to summary
private transient String myToString
OBJECTNAMEback to summary
public static final SimpleType<ObjectName> OBJECTNAME

The SimpleType instance describing values whose Java class name is javax.management.ObjectName.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides javax.management.openmbean.OpenType.serialVersionUID.

SHORTback to summary
public static final SimpleType<Short> SHORT

The SimpleType instance describing values whose Java class name is java.lang.Short.

STRINGback to summary
public static final SimpleType<String> STRING

The SimpleType instance describing values whose Java class name is java.lang.String.

typeArrayback to summary
private static final SimpleType<?>[] typeArray
VOIDback to summary
public static final SimpleType<Void> VOID

The SimpleType instance describing values whose Java class name is java.lang.Void.

Constructor Detail

SimpleTypeback to summary
private SimpleType(Class<T> valueClass)

Method Detail

equalsback to summary
public boolean equals(Object obj)

Implements abstract javax.management.openmbean.OpenType.equals.

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

Two SimpleType instances are equal if and only if their getClassName methods return the same value.

Parameters
obj:Object

the object to be compared for equality with this SimpleType instance; if obj is null or is not an instance of the class SimpleType, equals returns false.

Returns:boolean

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

hashCodeback to summary
public int hashCode()

Implements abstract javax.management.openmbean.OpenType.hashCode.

Returns the hash code value for this SimpleType instance. The hash code of a SimpleType instance is the hash code of the string value returned by the getClassName method.

As SimpleType 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 SimpleType instance

isValueback to summary
public boolean isValue(Object obj)

Implements abstract javax.management.openmbean.OpenType.isValue.

Tests whether obj is a value for this SimpleType 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 this SimpleType instance (ie the class name returned by the getClassName method).

Parameters
obj:Object

the object to be tested.

Returns:boolean

true if obj is a value for this SimpleType instance.

readResolveback to summary
public Object readResolve() throws ObjectStreamException

Replace an object read from an java.io.ObjectInputStream with the unique instance for that value.

Returns:Object

the replacement object.

Exceptions
ObjectStreamException:
if the read object cannot be resolved.
toStringback to summary
public String toString()

Implements abstract javax.management.openmbean.OpenType.toString.

Returns a string representation of this SimpleType 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 this SimpleType instance represents).

As SimpleType 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 SimpleType instance