public class DateFormatMethodExecutor extends Object implements MethodExecutor
MethodExecutor handling formatting using a SimpleDateFormat.| Constructor and Description |
|---|
DateFormatMethodExecutor()
Instantiates a new date format method executor.
|
DateFormatMethodExecutor(String key)
Instantiates a new date format method executor.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
dateFormat(String pattern,
Date date) |
static String |
dateFormat(String pattern,
Integer epoch) |
static String |
dateFormat(String pattern,
Long epoch) |
static String |
dateFormat(String pattern,
String datestring) |
static String |
dateFormat(String pattern,
String datestring,
String dateformat) |
TypedValue |
execute(EvaluationContext context,
Object target,
Object... arguments) |
protected String |
getKey()
Gets the key for timestamp if defined.
|
public DateFormatMethodExecutor()
public DateFormatMethodExecutor(String key)
key - the key for timestamppublic TypedValue execute(EvaluationContext context, Object target, Object... arguments) throws AccessException
execute in interface MethodExecutorAccessExceptionprotected String getKey()
public static String dateFormat(String pattern, Integer epoch) throws AccessException
AccessExceptionpublic static String dateFormat(String pattern, Long epoch) throws AccessException
AccessExceptionpublic static String dateFormat(String pattern, Date date) throws AccessException
AccessExceptionpublic static String dateFormat(String pattern, String datestring) throws AccessException
AccessExceptionpublic static String dateFormat(String pattern, String datestring, String dateformat) throws AccessException
AccessException