Class Classes

java.lang.Object
de.danielbechler.util.Classes

public final class Classes extends Object
  • Method Details

    • isPrimitiveNumericType

      public static boolean isPrimitiveNumericType(Class<?> clazz)
    • isComparableType

      public static boolean isComparableType(Class<?> clazz)
    • isSimpleType

      public static boolean isSimpleType(Class<?> clazz)
    • isPrimitiveType

      public static boolean isPrimitiveType(Class<?> clazz)
    • isPrimitiveWrapperType

      public static boolean isPrimitiveWrapperType(Class<?> clazz)
    • freshInstanceOf

      public static <T> T freshInstanceOf(Class<T> clazz)
    • typesOf

      public static Set<Class<?>> typesOf(Object... values)
    • allAssignableFrom

      public static boolean allAssignableFrom(Class<?> sharedType, Iterable<? extends Class<?>> types)
    • mostSpecificSharedType

      public 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). However, if one or more interfaces are given as type, they will be considered as most specific shared type.
      Returns:
      The most specific class (or interface) shared by all given types.