Top Description Constructors Methods
org.codehaus.groovy.runtime.typehandling

public Class ShortTypeHandling

extends Object
Class Inheritance
Imports
groovy.lang.GString, java.util.Arrays

Class providing various short paths for type conversions. Read the comments to what conditions have to be met to get valid results! Any method here must not depend on the groovy runtime.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Character
public static Class<T>
public static Enum<E extends Enum<E>>
castToEnum(Object object, Class<? extends Enum<E extends Enum<E>>> type)

this class requires that the supplied enum is not fitting a Collection case for casting

public static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ShortTypeHandlingback to summary
public ShortTypeHandling()

Method Detail

castToCharback to summary
public static Character castToChar(Object object)
castToClassback to summary
public static Class<T> castToClass(Object object)
castToEnumback to summary
public static Enum<E extends Enum<E>> castToEnum(Object object, Class<? extends Enum<E extends Enum<E>>> type)

this class requires that the supplied enum is not fitting a Collection case for casting

castToStringback to summary
public static String castToString(Object object)