Class Coercions


  • public class Coercions
    extends Object
    This implements the coercion table in RFC 190 5.6.3
    • Constructor Detail

      • Coercions

        public Coercions()
    • Method Detail

      • coerce

        public static Object coerce​(Class<?> type,
                                    Object raw,
                                    org.osgi.framework.Bundle bundle)
      • coerceToByte

        public static byte coerceToByte​(Object o)
      • coerceToChar

        public static char coerceToChar​(Object o)
      • coerceToDouble

        public static double coerceToDouble​(Object o)
      • coerceToFloat

        public static float coerceToFloat​(Object o)
      • coerceToInteger

        public static int coerceToInteger​(Object o)
      • coerceToLong

        public static long coerceToLong​(Object o)
      • coerceToShort

        public static short coerceToShort​(Object o)
      • coerceToString

        public static String coerceToString​(Object o)
      • coerceToBoolean

        public static boolean coerceToBoolean​(Object o)
      • coerceToClass

        public static Class<?> coerceToClass​(Object o,
                                             org.osgi.framework.Bundle b)
      • coerceToEnum

        public static <T extends Enum<T>> T coerceToEnum​(Object o,
                                                         Class<T> clazz)