Class Primitives

java.lang.Object
org.jboss.weld.util.Primitives

public final class Primitives extends Object
Author:
Martin Kouba
  • Method Details

    • wrap

      public static <T> Class<T> wrap(Class<T> type)
      Parameters:
      type -
      Returns:
      the wrapper type of the given type if it is a primitive, or the type itself otherwise
    • unwrap

      public static <T> Class<T> unwrap(Class<T> type)
      Parameters:
      type -
      Returns:
      the primitive type of the given type if it is a wrapper, or the type itself otherwise