Constructor and Description |
---|
I18nMacro() |
Modifier and Type | Method and Description |
---|---|
Object |
eval(LocalRenderContext ctx,
Expression[] args)
Evaluates the macro at runtime.
|
String |
getDescription()
Provides a short description of what the macro does for documentation purposes.
|
String |
getName() |
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.
|
void |
verifyArguments(List<Expression> args)
Verifies the argument type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dereference
public Class<?> getType()
Macro
public void verifyArguments(List<Expression> args)
If the i18n key is constant, it also ensures that a matching translation is present.
verifyArguments
in interface Macro
args
- the expressions which will be passed in at runtime.public boolean isConstant(Expression[] args)
Macro
isConstant
in interface Macro
args
- the arguments of the macropublic Object eval(LocalRenderContext ctx, Expression[] args)
Macro
Note that the arguments are still expressions and have to be evaluated on demand.
@Nonnull public String getName()
getName
in interface sirius.kernel.di.std.Named
public String getDescription()
Macro
getDescription
in interface Macro
Copyright © 2018. All rights reserved.