public abstract class Binder
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Binder.MethodAndParamInfo |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
MISSING |
static java.lang.Object |
NO_BINDING |
| Constructor and Description |
|---|
Binder() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
bind(java.lang.Object o,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.String[]> params)
Deprecated.
|
static java.lang.Object |
bind(RootParamNode parentParamNode,
java.lang.String name,
java.lang.Class<?> clazz,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations) |
static java.lang.Object |
bind(RootParamNode parentParamNode,
java.lang.String name,
java.lang.Class<?> clazz,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
Binder.MethodAndParamInfo methodAndParamInfo) |
static java.lang.Object |
bind(java.lang.String name,
java.lang.Class<?> clazz,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
java.util.Map<java.lang.String,java.lang.String[]> params)
Deprecated.
|
static void |
bindBean(ParamNode paramNode,
java.lang.Object bean,
java.lang.annotation.Annotation[] annotations)
Does NOT invoke plugins
|
static void |
bindBean(RootParamNode rootParamNode,
java.lang.String name,
java.lang.Object bean)
Invokes the plugins before using the internal bindBean.
|
static java.lang.Object |
directBind(java.lang.annotation.Annotation[] annotations,
java.lang.String value,
java.lang.Class<?> clazz,
java.lang.reflect.Type type)
Bind a object
|
static java.lang.Object |
directBind(java.lang.String name,
java.lang.annotation.Annotation[] annotations,
java.lang.String value,
java.lang.Class<?> clazz)
Bind a object
|
static java.lang.Object |
directBind(java.lang.String name,
java.lang.annotation.Annotation[] annotations,
java.lang.String value,
java.lang.Class<?> clazz,
java.lang.reflect.Type type)
This method calls the user's defined binders prior to bind simple type
|
static java.lang.Object |
directBind(java.lang.String value,
java.lang.Class<?> clazz)
Bind a object
|
protected static java.lang.Object |
internalBind(ParamNode paramNode,
java.lang.Class<?> clazz,
java.lang.reflect.Type type,
BindingAnnotations bindingAnnotations) |
static <T> void |
register(java.lang.Class<T> clazz,
TypeBinder<T> typeBinder)
Add custom binder for any given class
E.g.
|
static <T> void |
unregister(java.lang.Class<T> clazz)
Remove custom binder that was add with method #register(java.lang.Class, play.data.binding.TypeBinder)
|
public static final java.lang.Object MISSING
public static final java.lang.Object NO_BINDING
public static <T> void register(java.lang.Class<T> clazz,
TypeBinder<T> typeBinder)
T - The Class type to registerclazz - The class to registertypeBinder - The custom binderunregister(java.lang.Class)public static <T> void unregister(java.lang.Class<T> clazz)
T - The Class type to registerclazz - The class to remove the custom binder@Deprecated
public static java.lang.Object bind(java.lang.Object o,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.String[]> params)
o - Object to bindname - Name of the objectparams - List of the parameters@Deprecated
public static java.lang.Object bind(java.lang.String name,
java.lang.Class<?> clazz,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
java.util.Map<java.lang.String,java.lang.String[]> params)
public static java.lang.Object bind(RootParamNode parentParamNode, java.lang.String name, java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations)
public static java.lang.Object bind(RootParamNode parentParamNode, java.lang.String name, java.lang.Class<?> clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, Binder.MethodAndParamInfo methodAndParamInfo)
protected static java.lang.Object internalBind(ParamNode paramNode, java.lang.Class<?> clazz, java.lang.reflect.Type type, BindingAnnotations bindingAnnotations)
public static void bindBean(RootParamNode rootParamNode, java.lang.String name, java.lang.Object bean)
rootParamNode - List of parametersname - The object namebean - the bean objectpublic static void bindBean(ParamNode paramNode, java.lang.Object bean, java.lang.annotation.Annotation[] annotations)
paramNode - List of parametersbean - the bean objectannotations - annotations associated with the objectpublic static java.lang.Object directBind(java.lang.String value,
java.lang.Class<?> clazz)
throws java.lang.Exception
value - value to bindclazz - class of the objectjava.lang.Exception - if problem occurred during bindingpublic static java.lang.Object directBind(java.lang.String name,
java.lang.annotation.Annotation[] annotations,
java.lang.String value,
java.lang.Class<?> clazz)
throws java.lang.Exception
name - name of the objectannotations - annotation on the objectvalue - Value to bindclazz - The class of the objectjava.lang.Exception - if problem occurred during bindingpublic static java.lang.Object directBind(java.lang.annotation.Annotation[] annotations,
java.lang.String value,
java.lang.Class<?> clazz,
java.lang.reflect.Type type)
throws java.lang.Exception
annotations - annotation on the objectvalue - value to bindclazz - class of the objecttype - type to bindjava.lang.Exception - if problem occurred during bindingpublic static java.lang.Object directBind(java.lang.String name,
java.lang.annotation.Annotation[] annotations,
java.lang.String value,
java.lang.Class<?> clazz,
java.lang.reflect.Type type)
throws java.lang.Exception
name - name of the objectannotations - annotation on the objectvalue - value to bindclazz - class of the objecttype - type to bindjava.lang.Exception - if problem occurred during bindingGuillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly