Package ch.ivyteam.ivy.rest.client
Class GenericTypes
- java.lang.Object
-
- ch.ivyteam.ivy.rest.client.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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> javax.ws.rs.core.GenericType<ArrayList<T>>
listOf(Class<T> clazz)
Simplifies the definition of aList
return type.
-
-
-
Method Detail
-
listOf
public static <T> javax.ws.rs.core.GenericType<ArrayList<T>> listOf(Class<T> clazz)
Simplifies the definition of aList
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.
-
-