Package net.thevpc.common.util
Class PlatformUtils
java.lang.Object
net.thevpc.common.util.PlatformUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncommonAncestors(Class a, Class b) static Class[]findClassHierarchy(Class clazz, Class baseType) static TypeName[]findClassHierarchy(TypeName clazz, TypeName baseType) static TypeReference[]findClassHierarchy(TypeReference clazz, TypeReference baseType) static Class[]findClassOnlyHierarchy(Class clazz, Class baseType) static ClassfirstCommonSuperType(Class type1, Class type2) static intgetAssignationCost(Class parent, Class child) static ObjectgetDefaultValue(Class type) static <T> PlatformUtils.MethodObject<T>getMatchingMethod(PlatformUtils.MethodObject<T>[] available, Class... parameterTypes) static intgetPlatformType(Class cls) static Class[]static Class[]static StringgetSimpleTypeName(Class clazz) static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanisAssignableFrom(Class parent, Class child) static booleanstatic booleanstatic booleanstatic booleanisDateType(Class o) static booleanstatic booleanstatic booleanisDoubleFinite(double d) This is a work around if jdk 8 is not availablestatic booleanstatic booleanstatic booleanisFloatType(Class o) static booleanisInt(double d) static booleanisInteger(double d) static booleanstatic booleanstatic booleanisLong(double d) static booleanstatic booleanisLongType(Class o) static booleanstatic booleanstatic booleanisPrimitiveOrBoxed(Class type) static booleanstatic booleanisSimpleType(Class type) static ClasslowestCommonAncestor(Class a, Class b) static TypeNamestatic TypeReferencestatic Boolean[]toBooleanArray(boolean[] arr) static ClasstoBoxingType(Class type) static Double[]toDoubleArray(double[] arr) static Integer[]toIntArray(int[] arr) static Long[]toLongArray(long[] arr) static boolean[]toPrimitiveBooleanArray(Boolean[] arr) static boolean[]static double[]toPrimitiveDoubleArray(Double[] arr) static double[]static int[]toPrimitiveIntArray(Integer[] arr) static int[]static long[]toPrimitiveLongArray(Long[] arr) static long[]static ClasstoPrimitiveType(Class type) static ClasstoPrimitiveTypeOrNull(Class type) static boolean[]static boolean[]static double[]toSafePrimitiveDoubleArray(Double[] arr) static double[]static int[]toSafePrimitiveIntArray(Integer[] arr) static int[]static long[]toSafePrimitiveLongArray(Long[] arr) static long[]
-
Field Details
-
TYPE_NULLABLE
public static final int TYPE_NULLABLE- See Also:
-
TYPE_NUMBER
public static final int TYPE_NUMBER- See Also:
-
TYPE_YEAR
public static final int TYPE_YEAR- See Also:
-
TYPE_MONTH
public static final int TYPE_MONTH- See Also:
-
TYPE_TIMESTAMP
public static final int TYPE_TIMESTAMP- See Also:
-
TYPE_DATETIME
public static final int TYPE_DATETIME- See Also:
-
TYPE_DATE
public static final int TYPE_DATE- See Also:
-
TYPE_TIME
public static final int TYPE_TIME- See Also:
-
TYPE_DECIMAL
public static final int TYPE_DECIMAL- See Also:
-
TYPE_FLOAT
public static final int TYPE_FLOAT- See Also:
-
TYPE_INT
public static final int TYPE_INT- See Also:
-
TYPE_BOOLEAN
public static final int TYPE_BOOLEAN- See Also:
-
TYPE_STRING
public static final int TYPE_STRING- See Also:
-
TYPE_TEMPORAL
public static final int TYPE_TEMPORAL- See Also:
-
TYPE_OTHER
public static final int TYPE_OTHER- See Also:
-
TYPE_8
public static final int TYPE_8- See Also:
-
TYPE_16
public static final int TYPE_16- See Also:
-
TYPE_32
public static final int TYPE_32- See Also:
-
TYPE_64
public static final int TYPE_64- See Also:
-
TYPE_128
public static final int TYPE_128- See Also:
-
TYPE_BIG
public static final int TYPE_BIG- See Also:
-
-
Constructor Details
-
PlatformUtils
public PlatformUtils()
-
-
Method Details
-
lowestCommonAncestor
-
findClassHierarchy
-
findClassHierarchy
-
findClassHierarchy
-
findClassOnlyHierarchy
-
lowestCommonAncestor
-
lowestCommonAncestor
-
commonAncestors
-
getPrimitiveBoxingTypes
-
getPrimitiveTypes
-
getDefaultValue
-
getPlatformType
-
isPlatformNumber
-
isPlatformNumber
-
getSimpleTypeName
-
isPrimitiveOrBoxed
-
isSimpleType
-
isIntegerType
-
isLongType
-
isAnyIntegerType
-
isDateType
-
isAnyFloatType
-
isFloatType
-
isDoubleType
-
isBooleanType
-
isAnyIntegerValue
-
isAnyFloatValue
-
isDateValue
-
isAnyInteger
-
isInteger
-
isLong
-
isFloat
-
isDate
-
isDouble
-
isShort
-
isByte
-
isInteger
public static boolean isInteger(double d) -
isLong
public static boolean isLong(double d) -
toBooleanArray
-
toPrimitiveBooleanArray
-
toSafePrimitiveBooleanArray
-
toPrimitiveBooleanArray
-
toSafePrimitiveBooleanArray
-
toIntArray
-
toPrimitiveIntArray
-
toSafePrimitiveIntArray
-
toPrimitiveIntArray
-
toSafePrimitiveIntArray
-
toLongArray
-
toPrimitiveLongArray
-
toSafePrimitiveLongArray
-
toPrimitiveLongArray
-
toSafePrimitiveLongArray
-
toDoubleArray
-
toPrimitiveDoubleArray
-
toSafePrimitiveDoubleArray
-
toPrimitiveDoubleArray
-
toSafePrimitiveDoubleArray
-
toBoxingType
-
toPrimitiveTypeOrNull
-
toPrimitiveType
-
isAssignableFrom
-
getAssignationCost
-
firstCommonSuperType
-
getMatchingMethod
public static <T> PlatformUtils.MethodObject<T> getMatchingMethod(PlatformUtils.MethodObject<T>[] available, Class... parameterTypes) -
isDoubleFinite
public static boolean isDoubleFinite(double d) This is a work around if jdk 8 is not available- Parameters:
d-- Returns:
-
isInt
public static boolean isInt(double d)
-