public final class Classes extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
allAssignableFrom(Class<?> sharedType,
Iterable<? extends Class<?>> types) |
static <T> T |
freshInstanceOf(Class<T> clazz) |
static boolean |
isComparableType(Class<?> clazz) |
static boolean |
isPrimitiveNumericType(Class<?> clazz) |
static boolean |
isPrimitiveType(Class<?> clazz) |
static boolean |
isPrimitiveWrapperType(Class<?> clazz) |
static boolean |
isSimpleType(Class<?> clazz) |
static Class<?> |
mostSpecificSharedType(Collection<Class<?>> types)
This method will not extract the interfaces of the given types, since there is no way to determine, which
interface is the most specific one (due to their compositional nature).
|
static Set<Class<?>> |
typesOf(Object... values) |
public static boolean isPrimitiveNumericType(Class<?> clazz)
public static boolean isComparableType(Class<?> clazz)
public static boolean isSimpleType(Class<?> clazz)
public static boolean isPrimitiveType(Class<?> clazz)
public static boolean isPrimitiveWrapperType(Class<?> clazz)
public static <T> T freshInstanceOf(Class<T> clazz)
public static boolean allAssignableFrom(Class<?> sharedType, Iterable<? extends Class<?>> types)
public static Class<?> mostSpecificSharedType(Collection<Class<?>> types)
Copyright © 2015. All rights reserved.