javax.management.openmbean
Class OpenType

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.openmbean.OpenType
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
ArrayType sample code for javax.management.openmbean.ArrayType definition code for javax.management.openmbean.ArrayType , CompositeType sample code for javax.management.openmbean.CompositeType definition code for javax.management.openmbean.CompositeType , SimpleType sample code for javax.management.openmbean.SimpleType definition code for javax.management.openmbean.SimpleType , TabularType sample code for javax.management.openmbean.TabularType definition code for javax.management.openmbean.TabularType

public abstract class OpenType
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

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:

Since:
1.5
See Also:
Serialized Form

Field Summary
static String sample code for java.lang.String definition code for java.lang.String [] ALLOWED_CLASSNAMES sample code for javax.management.openmbean.OpenType.ALLOWED_CLASSNAMES definition code for javax.management.openmbean.OpenType.ALLOWED_CLASSNAMES
          List of the fully qualified names of the Java classes allowed for open data values.
 
Constructor Summary
protected OpenType sample code for javax.management.openmbean.OpenType.OpenType(java.lang.String, java.lang.String, java.lang.String) definition code for javax.management.openmbean.OpenType.OpenType(java.lang.String, java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  className, String sample code for java.lang.String definition code for java.lang.String  typeName, String sample code for java.lang.String definition code for java.lang.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  boolean equals sample code for javax.management.openmbean.OpenType.equals(java.lang.Object) definition code for javax.management.openmbean.OpenType.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Compares the specified obj parameter with this open type instance for equality.
 String sample code for java.lang.String definition code for java.lang.String getClassName sample code for javax.management.openmbean.OpenType.getClassName() definition code for javax.management.openmbean.OpenType.getClassName() ()
          Returns the fully qualified Java class name of the open data values this open type describes.
 String sample code for java.lang.String definition code for java.lang.String getDescription sample code for javax.management.openmbean.OpenType.getDescription() definition code for javax.management.openmbean.OpenType.getDescription() ()
          Returns the text description of this OpenType instance.
 String sample code for java.lang.String definition code for java.lang.String getTypeName sample code for javax.management.openmbean.OpenType.getTypeName() definition code for javax.management.openmbean.OpenType.getTypeName() ()
          Returns the name of this OpenType instance.
abstract  int hashCode sample code for javax.management.openmbean.OpenType.hashCode() definition code for javax.management.openmbean.OpenType.hashCode() ()
          Returns a hash code value for the object.
 boolean isArray sample code for javax.management.openmbean.OpenType.isArray() definition code for javax.management.openmbean.OpenType.isArray() ()
          Returns true if the open data values this open type describes are arrays, false otherwise.
abstract  boolean isValue sample code for javax.management.openmbean.OpenType.isValue(java.lang.Object) definition code for javax.management.openmbean.OpenType.isValue(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Tests whether obj is a value for this open type.
abstract  String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.management.openmbean.OpenType.toString() definition code for javax.management.openmbean.OpenType.toString() ()
          Returns a string representation of this open type instance.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

ALLOWED_CLASSNAMES sample code for javax.management.openmbean.OpenType.ALLOWED_CLASSNAMES

public static final String sample code for java.lang.String definition code for java.lang.String [] ALLOWED_CLASSNAMES
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.getName(),
        TabularData.class.getName() } ;
       

Constructor Detail

OpenType sample code for javax.management.openmbean.OpenType(java.lang.String, java.lang.String, java.lang.String) definition code for javax.management.openmbean.OpenType(java.lang.String, java.lang.String, java.lang.String)

protected OpenType(String sample code for java.lang.String definition code for java.lang.String  className,
                   String sample code for java.lang.String definition code for java.lang.String  typeName,
                   String sample code for java.lang.String definition code for java.lang.String  description)
            throws OpenDataException sample code for javax.management.openmbean.OpenDataException definition code for javax.management.openmbean.OpenDataException 
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 in ALLOWED_CLASSNAMES sample code for javax.management.openmbean.OpenType.ALLOWED_CLASSNAMES definition code for javax.management.openmbean.OpenType.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 getName() sample code for java.lang.Class.getName() definition code for java.lang.Class.getName() of java.lang.Class. For example, a 3-dimensional array of Strings has for class name "[[[Ljava.lang.String;" (without the quotes).
 
typeName - The name given to the open type this instance represents; cannot be a null or empty string.
 
description - The human readable description of the open type this instance represents; cannot be a null or empty string.
 
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if className, typeName or description is a null or empty string
 
OpenDataException sample code for javax.management.openmbean.OpenDataException definition code for javax.management.openmbean.OpenDataException - if className is not one of the allowed Java class names for open data
Method Detail

getClassName sample code for javax.management.openmbean.OpenType.getClassName() definition code for javax.management.openmbean.OpenType.getClassName()

public String sample code for java.lang.String definition code for java.lang.String  getClassName()
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 ALLOWED_CLASSNAMES sample code for javax.management.openmbean.OpenType.ALLOWED_CLASSNAMES definition code for javax.management.openmbean.OpenType.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 getName() sample code for java.lang.Class.getName() definition code for java.lang.Class.getName() of java.lang.Class. For example, a 3-dimensional array of Strings has for class name "[[[Ljava.lang.String;" (without the quotes).

Returns:
the class name.

getTypeName sample code for javax.management.openmbean.OpenType.getTypeName() definition code for javax.management.openmbean.OpenType.getTypeName()

public String sample code for java.lang.String definition code for java.lang.String  getTypeName()
Returns the name of this OpenType instance.

Returns:
the type name.

getDescription sample code for javax.management.openmbean.OpenType.getDescription() definition code for javax.management.openmbean.OpenType.getDescription()

public String sample code for java.lang.String definition code for java.lang.String  getDescription()
Returns the text description of this OpenType instance.

Returns:
the description.

isArray sample code for javax.management.openmbean.OpenType.isArray() definition code for javax.management.openmbean.OpenType.isArray()

public boolean isArray()
Returns true if the open data values this open type describes are arrays, false otherwise.

Returns:
true if this is an array type.

isValue sample code for javax.management.openmbean.OpenType.isValue(java.lang.Object) definition code for javax.management.openmbean.OpenType.isValue(java.lang.Object)

public abstract boolean isValue(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Tests whether obj is a value for this open type.

Parameters:
obj - the object to be tested for validity.
Returns:
true if obj is a value for this open type, false otherwise.

equals sample code for javax.management.openmbean.OpenType.equals(java.lang.Object) definition code for javax.management.openmbean.OpenType.equals(java.lang.Object)

public abstract boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Compares the specified obj parameter with this open type instance for equality.

Overrides:
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) in class Object sample code for java.lang.Object definition code for java.lang.Object
Parameters:
obj - the object to compare to.
Returns:
true if this object and obj are equal.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for javax.management.openmbean.OpenType.hashCode() definition code for javax.management.openmbean.OpenType.hashCode()

public abstract int hashCode()
Description copied from class: Object sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

toString sample code for javax.management.openmbean.OpenType.toString() definition code for javax.management.openmbean.OpenType.toString()

public abstract String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string representation of this open type instance.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
the string representation.