[Java] Class ShortTypeHandling
- org.codehaus.groovy.runtime.typehandling.ShortTypeHandling
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.
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
static Character |
castToChar(Object object) | |
static Class |
castToClass(Object object) | |
static Enum |
castToEnum(Object object, Class<? extends Enum> type) this class requires that the supplied enum is not fitting a Collection case for casting | |
static String |
castToString(Object object) |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail
public static Character castToChar(Object object)
public static Class castToClass(Object object)
public static Enum castToEnum(Object object, Class<? extends Enum> type)
this class requires that the supplied enum is not fitting a Collection case for casting
public static String castToString(Object object)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.5.14/html/gapi/org/codehaus/groovy/runtime/typehandling/ShortTypeHandling.html