T
- the type of object to construct from the request bodyO
- the type of object that provides options/configuration for the parsingpublic class Parse<T,O> extends Object
Construct instances via the of(com.google.common.reflect.TypeToken<T>, O)
methods.
Context.parse(Parse)
,
Parser
,
ParserSupport
Modifier and Type | Method and Description |
---|---|
O |
getOpts()
The type of object that provides options/configuration for the parsing.
|
com.google.common.reflect.TypeToken<T> |
getType()
The type of object to construct from the request body.
|
static <T> Parse<T,NullParseOpts> |
of(Class<T> type)
Creates a parse object, with a
NullParseOpts options object. |
static <T,O> Parse<T,O> |
of(Class<T> type,
O opts)
Creates a parse object.
|
static <T> Parse<T,NullParseOpts> |
of(com.google.common.reflect.TypeToken<T> type)
Creates a parse object, with a
NullParseOpts options object. |
static <T,O> Parse<T,O> |
of(com.google.common.reflect.TypeToken<T> type,
O opts)
Creates a parse object.
|
public com.google.common.reflect.TypeToken<T> getType()
public O getOpts()
public static <T,O> Parse<T,O> of(com.google.common.reflect.TypeToken<T> type, O opts)
T
- the type of object to construct from the request bodyO
- the type of object that provides options/configuration for the parsingtype
- the type of object to construct from the request bodyopts
- the options objectpublic static <T> Parse<T,NullParseOpts> of(com.google.common.reflect.TypeToken<T> type)
NullParseOpts
options object.T
- the type of object to construct from the request bodytype
- the type of object to construct from the request bodypublic static <T,O> Parse<T,O> of(Class<T> type, O opts)
T
- the type of object to construct from the request bodyO
- the type of object that provides options/configuration for the parsingtype
- the type of object to construct from the request bodyopts
- the options objectpublic static <T> Parse<T,NullParseOpts> of(Class<T> type)
NullParseOpts
options object.T
- the type of object to construct from the request bodytype
- the type of object to construct from the request body