Class Primitives

java.lang.Object
org.dalesbred.internal.utils.Primitives

public final class Primitives extends Object
Utilities for handling primitive types and their wrappers uniformly.
  • Method Details

    • wrap

      @NotNull public static <T> @NotNull Class<T> wrap(@NotNull @NotNull Class<T> type)
      Returns the corresponding wrapper type for a primitive type, or the type itself if it is not a primitive type.
    • wrap

      @NotNull public static @NotNull Type wrap(@NotNull @NotNull Type type)
    • unwrap

      @NotNull public static <T> @NotNull Class<T> unwrap(@NotNull @NotNull Class<T> type)
      Returns the corresponding primitive type for a wrapper type, or the type itself if it is not a wrapper.
    • arrayAsObjectArray

      @NotNull public static @NotNull Object[] arrayAsObjectArray(@NotNull @NotNull Object o)