Class Types

java.lang.Object
io.avaje.jsonb.Types

public class Types extends Object
Factory methods for types.
  • Method Details

    • arrayOf

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

      public static Type listOf(Type elementType)
      Returns a Type that is a List of the given element type.
    • setOf

      public static Type setOf(Type elementType)
      Returns a Type that is a Set of the given element type.
    • streamOf

      public static Type streamOf(Type elementType)
      Returns a Type that is a Stream of the given element type.
    • mapOf

      public static Type mapOf(Type valueElementType)
      Return the Type for a Map with String keys and the given value element type.
      Parameters:
      valueElementType - The type of the values in the Map.
      Returns:
      Type for a Map with String keys and the given value element type.
    • 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.