java.lang.Object
ushiosan.jvm_utilities.lang.Cls

public final class Cls extends Object
  • Method Details

    • isPrimitive

      public static boolean isPrimitive(@NotNull @NotNull Class<?> clazz)
      Checks whether the class of the argument is of some primitive type or some wrapper class corresponding to the primitive type.
      Parameters:
      clazz - the class to inspect
      Returns:
      true if the class is a primitive type or false otherwise
    • isPrimitive

      public static boolean isPrimitive(@NotNull @NotNull Object obj)
      Checks whether the class of the argument is of some primitive type or some wrapper class corresponding to the primitive type.
      Parameters:
      obj - the object to inspect
      Returns:
      true if the class is a primitive type or false otherwise
    • isPrimitiveArray

      public static boolean isPrimitiveArray(@NotNull @NotNull Class<?> clazz)
      Checks if the class of the argument is of some primitive type or some wrapper class corresponding to the primitive type (version for arrays).
      Parameters:
      clazz - the class to inspect
      Returns:
      true if the class is a primitive type or false otherwise
    • isPrimitiveArray

      public static boolean isPrimitiveArray(@NotNull @NotNull Object obj)
      Checks if the class of the argument is of some primitive type or some wrapper class corresponding to the primitive type (version for arrays).
      Parameters:
      obj - the object to inspect
      Returns:
      true if the class is a primitive type or false otherwise
    • toTypeArgs

      public static Class<?> @NotNull [] toTypeArgs(Object @NotNull ... args)
      Returns the type of all data passed as arguments
      Parameters:
      args - the arguments to convert
      Returns:
      an array with all element types