javax.management.openmbean
Class OpenType

java.lang.Object
  extended byjavax.management.openmbean.OpenType
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ArrayType (src) , CompositeType (src) , OpenTypeTestCase.MyOpenType (src) , SimpleType (src) , TabularType (src)

public abstract class OpenType
extends java.lang.Object
implements java.io.Serializable

A parent for all classes describing open types of open data values.

See Also:
Serialized Form

Field Summary
static java.lang.String[] ALLOWED_CLASSNAMES
          The allowed classnames.
 
Constructor Summary
protected OpenType(java.lang.String className, java.lang.String typeName, java.lang.String description)
          Construct an OpenType.
 
Method Summary
abstract  boolean equals(java.lang.Object obj)
          Compares two object types for equality
 java.lang.String getClassName()
          Retrieve the class name of the open data values of this open data type.
 java.lang.String getDescription()
          Retrieve the description of the type
 java.lang.String getTypeName()
          Retrieve the name of the open data type
abstract  int hashCode()
          Retrieve the hashCode for this OpenType
 boolean isArray()
          Retrieve whether the class name of the type is an array
abstract  boolean isValue(java.lang.Object obj)
          Whether the passed value is one of those described by this open type.
abstract  java.lang.String toString()
          Retrieve a string representation of this open type
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ALLOWED_CLASSNAMES

public static final java.lang.String[] ALLOWED_CLASSNAMES
The allowed classnames.

One of
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.lang.Date
java.math.BigDecimal
java.math.BigInteger
javax.management.ObjectName
CompositeData (src) .class.getName()
TabularData (src) .class.getName()

Constructor Detail

OpenType

protected OpenType(java.lang.String className,
                   java.lang.String typeName,
                   java.lang.String description)
            throws OpenDataException (src) 
Construct an OpenType.

The class name must be in ALLOWED_CLASSNAMES or an array of those classes.

Parameters:
className - the name of the class implementing the open type, cannot be null
typeName - the name of the open type, cannot be null
description - the human readable description of the type, cannot be null
Throws:
OpenDataException (src) - when class name is not allowed class
java.lang.IllegalArgumentException - for a null argument
Method Detail

getClassName

public java.lang.String getClassName()
Retrieve the class name of the open data values of this open data type. It is one of those listed in ALLOWED_CLASSNAMES or a (multi-dimensional) array of one of those classes.

Returns:
the class name

getTypeName

public java.lang.String getTypeName()
Retrieve the name of the open data type

Returns:
the type name

getDescription

public java.lang.String getDescription()
Retrieve the description of the type

Returns:
the description

isArray

public boolean isArray()
Retrieve whether the class name of the type is an array

Returns:
true when it is an array or false otherwise

isValue

public abstract boolean isValue(java.lang.Object obj)
Whether the passed value is one of those described by this open type.

Parameters:
obj - the object to test
Returns:
true when it is value for this open type, false otherwise

equals

public abstract boolean equals(java.lang.Object obj)
Compares two object types for equality

Returns:
obj the object to test with this one

hashCode

public abstract int hashCode()
Retrieve the hashCode for this OpenType

Returns:
the hash code

toString

public abstract java.lang.String toString()
Retrieve a string representation of this open type

Returns:
the string representation