public abstract class DateComparingMacro extends Object implements Macro
macros handling date comparison| Constructor and Description |
|---|
DateComparingMacro() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
compare(LocalDateTime firstDate,
LocalDateTime secondDate) |
Object |
eval(LocalRenderContext ctx,
Expression[] args)
Evaluates the macro at runtime.
|
Class<?> |
getType()
Returns the type of objects returned by this macro.
|
boolean |
isConstant(Expression[] args)
Determines if the macro is "constant" for the given parameter expressions.
|
protected LocalDateTime |
parseInput(Object object) |
void |
verifyArguments(List<Expression> args)
Verifies the arguments.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdereference, getDescriptionpublic Class<?> getType()
Macropublic boolean isConstant(Expression[] args)
MacroisConstant in interface Macroargs - the arguments of the macroprotected LocalDateTime parseInput(Object object)
public Object eval(LocalRenderContext ctx, Expression[] args)
MacroNote that the arguments are still expressions and have to be evaluated on demand.
protected abstract boolean compare(LocalDateTime firstDate, LocalDateTime secondDate)
public void verifyArguments(List<Expression> args)
Macro
This is used to verify the type and count of arguments at compile time. If one or more arguments are invalid an
IllegalArgumentException can be thrown.
verifyArguments in interface Macroargs - the expressions which will be passed in at runtime.Copyright © 2018. All rights reserved.