play.data.binding
Class Binder

java.lang.Object
  extended by play.data.binding.Binder

public abstract class Binder
extends java.lang.Object

The binder try to convert String values to Java objects.


Nested Class Summary
static class Binder.MethodAndParamInfo
           
 
Field Summary
static java.lang.Object MISSING
           
static java.lang.Object NO_BINDING
           
 
Constructor Summary
Binder()
           
 
Method Summary
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)
           
static java.lang.Object directBind(java.lang.String name, java.lang.annotation.Annotation[] annotations, java.lang.String value, java.lang.Class<?> clazz)
           
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)
           
protected static java.lang.Object internalBind(ParamNode paramNode, java.lang.Class<?> clazz, java.lang.reflect.Type type, play.data.binding.BindingAnnotations bindingAnnotations)
           
static
<T> void
register(java.lang.Class<T> clazz, TypeBinder<T> typeBinder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MISSING

public static final java.lang.Object MISSING

NO_BINDING

public static final java.lang.Object NO_BINDING
Constructor Detail

Binder

public Binder()
Method Detail

register

public static <T> void register(java.lang.Class<T> clazz,
                                TypeBinder<T> typeBinder)

bind

@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)
Deprecated. 

Deprecated. Use bindBean() instead.


bind

@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)
Deprecated. 


bind

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)

bind

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)

internalBind

protected static java.lang.Object internalBind(ParamNode paramNode,
                                               java.lang.Class<?> clazz,
                                               java.lang.reflect.Type type,
                                               play.data.binding.BindingAnnotations bindingAnnotations)

bindBean

public static void bindBean(RootParamNode rootParamNode,
                            java.lang.String name,
                            java.lang.Object bean)
Invokes the plugins before using the internal bindBean.


bindBean

public static void bindBean(ParamNode paramNode,
                            java.lang.Object bean,
                            java.lang.annotation.Annotation[] annotations)
                     throws java.lang.Exception
Does NOT invoke plugins

Throws:
java.lang.Exception

directBind

public static java.lang.Object directBind(java.lang.String value,
                                          java.lang.Class<?> clazz)
                                   throws java.lang.Exception
Parameters:
value -
clazz -
Returns:
Throws:
java.lang.Exception

directBind

public 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
Parameters:
name -
annotations -
value -
clazz -
type -
Returns:
Throws:
java.lang.Exception

directBind

public 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
Parameters:
annotations -
value -
clazz -
type -
Returns:
Throws:
java.lang.Exception

directBind

public 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
This method calls the user's defined binders prior to bind simple type

Parameters:
name -
annotations -
value -
clazz -
type -
Returns:
Throws:
java.lang.Exception


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly