javax.management.openmbean
Class OpenType

java.lang.Object
  extended byjavax.management.openmbean.OpenType
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ArrayType, CompositeType, SimpleType, TabularType

public abstract class OpenType
extends Object
implements Serializable

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

Version:
$Revision: 1.1.2.2 $
Author:
Adrian Brock
See Also:
Serialized Form

Field Summary
static String[] ALLOWED_CLASSNAMES
          The allowed classnames.
 
Constructor Summary
protected OpenType(String className, String typeName, String description)
          Construct an OpenType.
 
Method Summary
abstract  boolean equals(Object obj)
          Compares two object types for equality
 String getClassName()
          Retrieve the class name of the open data values of this open data type.
 String getDescription()
          Retrieve the description of the type
 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(Object obj)
          Whether the passed value is one of those described by this open type.
abstract  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 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.class.getName()
TabularData.class.getName()

Constructor Detail

OpenType

protected OpenType(String className,
                   String typeName,
                   String description)
            throws OpenDataException
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 - when class name is not allowed class
IllegalArgumentException - for a null argument
Method Detail

getClassName

public 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 String getTypeName()
Retrieve the name of the open data type

Returns:
the type name

getDescription

public 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(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(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 String toString()
Retrieve a string representation of this open type

Returns:
the string representation


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.