MetaDone
metadone.util.ClassUtil Class Reference
Collaboration diagram for metadone.util.ClassUtil:

List of all members.

Static Public Member Functions

static< T > T convert (Class< T > cl, Object value)
static boolean isConvertible (Class<?> cl)
static boolean isIntegral (Class<?extends Number > c)
static< EextendsEnum< E > E parseEnum (Class< E > cla, Object val, E def)

Static Package Functions

 [static initializer]

Private Member Functions

 ClassUtil ()

Static Private Attributes

static HashSet< Class<?> > integralClasses = new HashSet<Class<?>>()

Constructor & Destructor Documentation

metadone.util.ClassUtil.ClassUtil ( ) [private]

Member Function Documentation

metadone.util.ClassUtil.[static initializer] ( ) [static, package]
static boolean metadone.util.ClassUtil.isConvertible ( Class<?>  cl) [static]

Indicates whether the class can be used as a destination of convert(Class, Object).

Parameters:
clThe class
Returns:
true if it should be possible to use convert(Class, Object) for the given class
See also:
#convert(Class, Object)

Referenced by metadone.client.MainClientMetadone.QuestionSubscriber.trigger().

static boolean metadone.util.ClassUtil.isIntegral ( Class<?extends Number >  c) [static]
static <EextendsEnum<E> E metadone.util.ClassUtil.parseEnum ( Class< E >  cla,
Object  val,
def 
) [static]

Converts a value into an enumeration value.

Parameters:
<E>The type of the enumeration
claThe class
valThe value
defThe default enumeration value or null
Returns:
A value found using val or def if no value has been found

Referenced by metadone.client.grasyla2.base.StrokeEngine.StrokeBuilder.build().


Member Data Documentation

HashSet<Class<?> > metadone.util.ClassUtil.integralClasses = new HashSet<Class<?>>() [static, private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations