public class ParserBuilder extends Object implements Parser.Builder
Modifier and Type | Field and Description |
---|---|
com.google.inject.TypeLiteral<?> |
toType |
Object |
value |
Constructor and Description |
---|
ParserBuilder(Parser.Context ctx,
com.google.inject.TypeLiteral<?> toType,
Object value) |
Modifier and Type | Method and Description |
---|---|
Parser.Builder |
body(Parser.Callback<Parser.BodyReference> callback)
Add a HTTP body callback.
|
Parser.Builder |
ifbody(Parser.Callback<Parser.BodyReference> callback)
Like
#body(Callback) but it skip the callback if the requested type is an
Optional . |
Parser.Builder |
ifparam(Parser.Callback<Parser.ParamReference<String>> callback)
Like
#param(Callback) but it skip the callback if the requested type is an
Optional . |
Parser.Builder |
ifparams(Parser.Callback<Map<String,Mutant>> callback)
Like
#params(Callback) but it skip the callback if the requested type is an
Optional . |
Parser.Builder |
ifupload(Parser.Callback<Parser.ParamReference<Upload>> callback)
Like
#upload(Callback) but it skip the callback if the requested type is an
Optional . |
Parser.Builder |
param(Parser.Callback<Parser.ParamReference<String>> callback)
Add a HTTP param callback.
|
Parser.Builder |
params(Parser.Callback<Map<String,Mutant>> callback)
Add a HTTP params callback.
|
Object |
parse() |
Parser.Builder |
upload(Parser.Callback<Parser.ParamReference<Upload>> callback)
Add a HTTP upload callback.
|
public final com.google.inject.TypeLiteral<?> toType
public final Object value
public ParserBuilder(Parser.Context ctx, com.google.inject.TypeLiteral<?> toType, Object value)
public Parser.Builder body(Parser.Callback<Parser.BodyReference> callback)
Parser.Builder
Request.body()
.
If current Parser.Context
isn't a HTTP body a call to Parser.Context.next()
is made.body
in interface Parser.Builder
callback
- A body parser callback.public Parser.Builder ifbody(Parser.Callback<Parser.BodyReference> callback)
Parser.Builder
#body(Callback)
but it skip the callback if the requested type is an
Optional
.ifbody
in interface Parser.Builder
callback
- A body parser callback.public Parser.Builder param(Parser.Callback<Parser.ParamReference<String>> callback)
Parser.Builder
Request.param(String)
.
If current Parser.Context
isn't a HTTP param a call to Parser.Context.next()
is made.param
in interface Parser.Builder
callback
- A param parser callback.public Parser.Builder ifparam(Parser.Callback<Parser.ParamReference<String>> callback)
Parser.Builder
#param(Callback)
but it skip the callback if the requested type is an
Optional
.ifparam
in interface Parser.Builder
callback
- A param parser callback.public Parser.Builder params(Parser.Callback<Map<String,Mutant>> callback)
Parser.Builder
Request.params()
.
If current Parser.Context
isn't a HTTP params a call to Parser.Context.next()
is made.params
in interface Parser.Builder
callback
- A params parser callback.public Parser.Builder ifparams(Parser.Callback<Map<String,Mutant>> callback)
Parser.Builder
#params(Callback)
but it skip the callback if the requested type is an
Optional
.ifparams
in interface Parser.Builder
callback
- A params parser callback.public Parser.Builder upload(Parser.Callback<Parser.ParamReference<Upload>> callback)
Parser.Builder
Request.param(String)
.
If current Parser.Context
isn't a HTTP upload a call to Parser.Context.next()
is made.upload
in interface Parser.Builder
callback
- A upload parser callback.public Parser.Builder ifupload(Parser.Callback<Parser.ParamReference<Upload>> callback)
Parser.Builder
#upload(Callback)
but it skip the callback if the requested type is an
Optional
.ifupload
in interface Parser.Builder
callback
- A upload parser callback.Copyright © 2015. All rights reserved.