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
-
@Beta public class EagerMacroFunction extends MacroFunction
-
-
Field Summary
-
Fields inherited from class com.hubspot.jinjava.lib.fn.MacroFunction
caller, content, deferred, definitionLineNumber, definitionStartPosition, KWARGS_KEY, localContextScope, VARARGS_KEY
-
Fields inherited from class com.hubspot.jinjava.el.ext.AbstractCallableMethod
EVAL_METHOD
-
-
Constructor Summary
Constructors Constructor Description EagerMacroFunction(List<Node> content, String name, LinkedHashMap<String,Object> argNamesWithDefaults, boolean caller, Context localContextScope, int lineNumber, int startPosition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
doEvaluate(Map<String,Object> argMap, Map<String,Object> kwargMap, List<Object> varArgs)
boolean
equals(Object o)
int
hashCode()
String
reconstructImage()
String
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
-
-
-
-
Method Detail
-
doEvaluate
public Object doEvaluate(Map<String,Object> argMap, Map<String,Object> kwargMap, List<Object> varArgs)
- Overrides:
doEvaluate
in classMacroFunction
-
reconstructImage
public String reconstructImage()
- Overrides:
reconstructImage
in classMacroFunction
-
reconstructImage
public String 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.- 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
public boolean equals(Object o)
- Overrides:
equals
in classMacroFunction
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classMacroFunction
-
-