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 ArgumentsNode
args
private java.lang.String
functionName
private int
lineNumber
-
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 void
accept(NodeVisitor visitor)
private java.lang.Object
applyFunction(PebbleTemplateImpl self, EvaluationContextImpl context, Function function, ArgumentsNode args)
java.lang.Object
evaluate(PebbleTemplateImpl self, EvaluationContextImpl context)
ArgumentsNode
getArguments()
java.lang.String
getFunctionName()
int
getLineNumber()
Returns the line number on which the expression is defined on.java.lang.String
toString()
-
-
-
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:
evaluate
in 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:Expression
Returns the line number on which the expression is defined on.- Specified by:
getLineNumber
in interfaceExpression<java.lang.Object>
- Returns:
- the line number on which the expression is defined on.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-