public static interface ParamConverter.Context
convert(TypeLiteral, Object[])
method.
But also let you access to request/app services.Modifier and Type | Method and Description |
---|---|
Object |
convert(com.google.inject.TypeLiteral<?> type,
Object[] values)
Ask to the next convert to resolve a type.
|
default <T> T |
require(Class<T> type)
Find and return a service using the provided type.
|
<T> T |
require(com.google.inject.Key<T> key)
Find and return a service using the provided key.
|
default <T> T |
require(com.google.inject.TypeLiteral<T> type)
Find and return a service using the provided type.
|
default <T> T require(Class<T> type)
T
- Service type.type
- A service type.default <T> T require(com.google.inject.TypeLiteral<T> type)
T
- Service type.type
- A service type.<T> T require(com.google.inject.Key<T> key)
T
- Service type.key
- A key for a service.Object convert(com.google.inject.TypeLiteral<?> type, Object[] values) throws Exception
type
- A type to resolve.values
- Raw values. Types is one of two: String
or Upload
.Exception
- If conversion fails.Copyright © 2015. All rights reserved.