Class ShortTypeHandling
java.lang.Object
org.codehaus.groovy.runtime.typehandling.ShortTypeHandling
public class ShortTypeHandling
extends java.lang.Object
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
Constructors Constructor Description ShortTypeHandling()
-
Method Summary
Modifier and Type Method Description static java.lang.Character
castToChar(java.lang.Object object)
static java.lang.Class
castToClass(java.lang.Object object)
static java.lang.Enum
castToEnum(java.lang.Object object, java.lang.Class<? extends java.lang.Enum> type)
this class requires that the supplied enum is not fitting a Collection case for castingstatic java.lang.String
castToString(java.lang.Object object)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ShortTypeHandling
public ShortTypeHandling()
-
-
Method Details
-
castToClass
public static java.lang.Class castToClass(java.lang.Object object) -
castToString
public static java.lang.String castToString(java.lang.Object object) -
castToEnum
public static java.lang.Enum castToEnum(java.lang.Object object, java.lang.Class<? extends java.lang.Enum> type)this class requires that the supplied enum is not fitting a Collection case for casting -
castToChar
public static java.lang.Character castToChar(java.lang.Object object)
-