Class FunctionOrMacroInvocationExpression
- java.lang.Object
-
- io.pebbletemplates.pebble.node.expression.FunctionOrMacroInvocationExpression
-
- All Implemented Interfaces:
Expression<java.lang.Object>,Node
public class FunctionOrMacroInvocationExpression extends java.lang.Object implements Expression<java.lang.Object>
-
-
Field Summary
Fields Modifier and Type Field Description private ArgumentsNodeargsprivate java.lang.StringfunctionNameprivate intlineNumber
-
Constructor Summary
Constructors Constructor Description FunctionOrMacroInvocationExpression(java.lang.String functionName, ArgumentsNode arguments, int lineNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(NodeVisitor visitor)private java.lang.ObjectapplyFunction(PebbleTemplateImpl self, EvaluationContextImpl context, Function function, ArgumentsNode args)java.lang.Objectevaluate(PebbleTemplateImpl self, EvaluationContextImpl context)ArgumentsNodegetArguments()java.lang.StringgetFunctionName()intgetLineNumber()Returns the line number on which the expression is defined on.java.lang.StringtoString()
-
-
-
Field Detail
-
functionName
private final java.lang.String functionName
-
args
private final ArgumentsNode args
-
lineNumber
private final int lineNumber
-
-
Constructor Detail
-
FunctionOrMacroInvocationExpression
public FunctionOrMacroInvocationExpression(java.lang.String functionName, ArgumentsNode arguments, int lineNumber)
-
-
Method Detail
-
evaluate
public java.lang.Object evaluate(PebbleTemplateImpl self, EvaluationContextImpl context)
- Specified by:
evaluatein interfaceExpression<java.lang.Object>
-
applyFunction
private java.lang.Object applyFunction(PebbleTemplateImpl self, EvaluationContextImpl context, Function function, ArgumentsNode args)
-
accept
public void accept(NodeVisitor visitor)
-
getFunctionName
public java.lang.String getFunctionName()
-
getArguments
public ArgumentsNode getArguments()
-
getLineNumber
public int getLineNumber()
Description copied from interface:ExpressionReturns the line number on which the expression is defined on.- Specified by:
getLineNumberin interfaceExpression<java.lang.Object>- Returns:
- the line number on which the expression is defined on.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-