Package play.data.binding
Interface TypeBinder<T>
-
- All Known Implementing Classes:
As.DEFAULT
,BinaryBinder
,ByteArrayArrayBinder
,ByteArrayBinder
,CalendarBinder
,DateBinder
,DateTimeBinder
,FileArrayBinder
,FileBinder
,LocalDateTimeBinder
,LocaleBinder
,UploadArrayBinder
,UploadBinder
public interface TypeBinder<T>
Supported type for binding. This interface is used to implement custom binders.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
bind(java.lang.String name, java.lang.annotation.Annotation[] annotations, java.lang.String value, java.lang.Class actualClass, java.lang.reflect.Type genericType)
Called when your parameter needs to be bound.
-
-
-
Method Detail
-
bind
java.lang.Object bind(java.lang.String name, java.lang.annotation.Annotation[] annotations, java.lang.String value, java.lang.Class actualClass, java.lang.reflect.Type genericType) throws java.lang.Exception
Called when your parameter needs to be bound.- Parameters:
name
- the name of you parameter ie myparam for a simple param but can also be a complex one : mybean.address.streetannotations
- An array of annotation that may be bound to your method parameter or your bean propertyvalue
- the actual value as a string that needs to be boundactualClass
- The class of the object you want to associate the value withgenericType
- The generic type associated with the object you want to bound the value to- Returns:
- the 'bound' object for example a date object if the value was '12/12/2002'
- Throws:
java.text.ParseException
- if parameter has invalid format (e.g. date)java.lang.Exception
- deprecated! Will be removed in Play 1.5
-
-