com.xerox.bantam
Class ClassTypeDescriptor

java.lang.Object
  |
  +--com.xerox.bantam.ClassTypeDescriptor
All Implemented Interfaces:
Serializable, TypeDescriptor
Direct Known Subclasses:
EnumeratedType

public class ClassTypeDescriptor
extends Object
implements TypeDescriptor, Serializable

TypeDescriptor for value types identical to Java classes.

Version:
$Revision: 1.5 $, $Date: 2000/03/14 18:31:58 $
Author:
Tom Rodriguez
See Also:
Serialized Form

Field Summary
protected  Class clazz
          The class which is this type.
 
Constructor Summary
protected ClassTypeDescriptor()
           
  ClassTypeDescriptor(Class c)
           
 
Method Summary
 boolean contains(Object item)
          return true if the item is in the type
 String description()
          return a string describing the possible values, suitable for an error message or other guidance to the user
 boolean equals(Object o)
           
 Class getBaseType()
          The primitive class with represents this type.
 int hashCode()
           
 Object parse(String name)
          Try to do something reasonable with the string passed in.
 Collection possibleValues()
          return null if the possible values can't be enumerated.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

clazz

protected Class clazz
The class which is this type.
Constructor Detail

ClassTypeDescriptor

protected ClassTypeDescriptor()

ClassTypeDescriptor

public ClassTypeDescriptor(Class c)
Method Detail

getBaseType

public Class getBaseType()
Description copied from interface: TypeDescriptor
The primitive class with represents this type.
Specified by:
getBaseType in interface TypeDescriptor

contains

public boolean contains(Object item)
return true if the item is in the type
Specified by:
contains in interface TypeDescriptor

possibleValues

public Collection possibleValues()
return null if the possible values can't be enumerated.
Specified by:
possibleValues in interface TypeDescriptor

description

public String description()
return a string describing the possible values, suitable for an error message or other guidance to the user
Specified by:
description in interface TypeDescriptor

parse

public Object parse(String name)
Try to do something reasonable with the string passed in. return null if that is not possible
Specified by:
parse in interface TypeDescriptor

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

Project Harland