Class 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.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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 casting
      static 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 Detail

      • ShortTypeHandling

        public ShortTypeHandling()
    • Method Detail

      • 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)