Class BinaryOperatorImpl
java.lang.Object
io.pebbletemplates.pebble.operator.BinaryOperatorImpl
- All Implemented Interfaces:
BinaryOperator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Associativity
private final Supplier
<? extends BinaryExpression<?>> private final int
private final String
private final BinaryOperatorType
-
Constructor Summary
ConstructorsConstructorDescriptionBinaryOperatorImpl
(String symbol, int precedence, Class<? extends BinaryExpression<?>> nodeClass, Associativity associativity) This constuctor left for backward compatibility with custom extensionsBinaryOperatorImpl
(String symbol, int precedence, Supplier<? extends BinaryExpression<?>> nodeSupplier, BinaryOperatorType type, Associativity associativity) This constuctor allows you to completely control the instantiation of the expression class -
Method Summary
Modifier and TypeMethodDescriptionprivate static BinaryOperatorType
getDefaultType
(Class<? extends BinaryExpression<?>> nodeClass) int
getType()
-
Field Details
-
precedence
private final int precedence -
symbol
-
nodeSupplier
-
type
-
associativity
-
-
Constructor Details
-
BinaryOperatorImpl
public BinaryOperatorImpl(String symbol, int precedence, Class<? extends BinaryExpression<?>> nodeClass, Associativity associativity) This constuctor left for backward compatibility with custom extensions -
BinaryOperatorImpl
public BinaryOperatorImpl(String symbol, int precedence, Supplier<? extends BinaryExpression<?>> nodeSupplier, BinaryOperatorType type, Associativity associativity) This constuctor allows you to completely control the instantiation of the expression class
-
-
Method Details
-
getPrecedence
public int getPrecedence()- Specified by:
getPrecedence
in interfaceBinaryOperator
-
getSymbol
- Specified by:
getSymbol
in interfaceBinaryOperator
-
createInstance
- Specified by:
createInstance
in interfaceBinaryOperator
-
getType
- Specified by:
getType
in interfaceBinaryOperator
-
getAssociativity
- Specified by:
getAssociativity
in interfaceBinaryOperator
-
getDefaultType
-