Package com.hubspot.jinjava.lib.fn.eager
Class EagerMacroFunction
java.lang.Object
com.hubspot.jinjava.el.ext.AbstractCallableMethod
com.hubspot.jinjava.lib.fn.MacroFunction
com.hubspot.jinjava.lib.fn.eager.EagerMacroFunction
-
Field Summary
Fields inherited from class com.hubspot.jinjava.lib.fn.MacroFunction
KWARGS_KEY, VARARGS_KEY
Fields inherited from class com.hubspot.jinjava.el.ext.AbstractCallableMethod
EVAL_METHOD
-
Constructor Summary
ConstructorsConstructorDescriptionEagerMacroFunction
(List<Node> content, String name, LinkedHashMap<String, Object> argNamesWithDefaults, boolean caller, Context localContextScope, int lineNumber, int startPosition) -
Method Summary
Modifier and TypeMethodDescriptioncloneWithNewName
(String name) boolean
int
hashCode()
reconstructImage
(String fullName) Reconstruct the image of the macro function, @see MacroFunction#reconstructImage() This image, however, may be partially or fully resolved depending on the usage of the arguments, which are filled in as deferred values, and any values on this interpreter's context.Methods inherited from class com.hubspot.jinjava.lib.fn.MacroFunction
getEvaluationResult, getImportFile, isCaller, isDeferred, setDeferred
Methods inherited from class com.hubspot.jinjava.el.ext.AbstractCallableMethod
evaluate, getArguments, getDefaults, getName
-
Constructor Details
-
EagerMacroFunction
-
-
Method Details
-
doEvaluate
public Object doEvaluate(Map<String, Object> argMap, Map<String, Object> kwargMap, List<Object> varArgs) - Overrides:
doEvaluate
in classMacroFunction
-
reconstructImage
- Overrides:
reconstructImage
in classMacroFunction
-
reconstructImage
Reconstruct the image of the macro function, @see MacroFunction#reconstructImage() This image, however, may be partially or fully resolved depending on the usage of the arguments, which are filled in as deferred values, and any values on this interpreter's context.- Returns:
- An image of the macro function that's body is resolved as much as possible. This image allows for the macro function to be recreated during a later rendering pass.
-
equals
- Overrides:
equals
in classMacroFunction
-
hashCode
public int hashCode()- Overrides:
hashCode
in classMacroFunction
-
cloneWithNewName
- Overrides:
cloneWithNewName
in classMacroFunction
-