Class GenericTypes


  • public class GenericTypes
    extends Object
    Simplifies the definition of a de-serialization type for a REST response entity.
    Since:
    6.1.1
    API:
    This is a public API.
    • Method Detail

      • listOf

        public static <T> javax.ws.rs.core.GenericType<ArrayList<T>> listOf​(Class<T> clazz)
        Simplifies the definition of a List return type. E.g.
        List<Person> persons = Ivy.rest().client("theService").request().get(GenericTypes.listOf(Person.class))
        Parameters:
        clazz - generic type parameter of the list
        Returns:
        generic type definition for REST response.
        API:
        This public API is available in Java.