Class Util


  • public final class Util
    extends Object
    Utility methods for defining Types.
    • Method Detail

      • arrayOf

        public static GenericArrayType arrayOf​(Type elementType)
        Returns an array type whose elements are all instances of componentType.
      • newParameterizedType

        public static ParameterizedType newParameterizedType​(Type rawType,
                                                             Type... typeArguments)
        Returns a new parameterized type, applying typeArguments to rawType. Use this method if rawType is not enclosed in another type.