Package play.data.binding.types
Class DateBinder
- java.lang.Object
-
- play.data.binding.types.DateBinder
-
- All Implemented Interfaces:
TypeBinder<java.util.Date>
public class DateBinder extends java.lang.Object implements TypeBinder<java.util.Date>
Binder that support Date class.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ISO8601
-
Constructor Summary
Constructors Constructor Description DateBinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Date
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.
-
-
-
Field Detail
-
ISO8601
public static final java.lang.String ISO8601
- See Also:
- Constant Field Values
-
-
Method Detail
-
bind
public java.util.Date 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
Description copied from interface:TypeBinder
Called when your parameter needs to be bound.- Specified by:
bind
in interfaceTypeBinder<java.util.Date>
- 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
-
-