Class Uberspect.ArithmeticUberspect
- java.lang.Object
-
- org.apache.commons.jexl3.internal.introspection.Uberspect.ArithmeticUberspect
-
- All Implemented Interfaces:
JexlArithmetic.Uberspect
- Enclosing class:
- Uberspect
protected class Uberspect.ArithmeticUberspect extends java.lang.Object implements JexlArithmetic.Uberspect
The concrete uberspect Arithmetic class.
-
-
Field Summary
Fields Modifier and Type Field Description private JexlArithmetic
arithmetic
The arithmetic instance being analyzed.private java.util.Set<JexlOperator>
overloads
The set of overloaded operators.
-
Constructor Summary
Constructors Constructor Description ArithmeticUberspect(JexlArithmetic theArithmetic, java.util.Set<JexlOperator> theOverloads)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JexlMethod
getOperator(JexlOperator operator, java.lang.Object... args)
Gets the most specific method for an operator.boolean
overloads(JexlOperator operator)
Checks whether this uberspect has overloads for a given operator.
-
-
-
Field Detail
-
arithmetic
private final JexlArithmetic arithmetic
The arithmetic instance being analyzed.
-
overloads
private final java.util.Set<JexlOperator> overloads
The set of overloaded operators.
-
-
Constructor Detail
-
ArithmeticUberspect
ArithmeticUberspect(JexlArithmetic theArithmetic, java.util.Set<JexlOperator> theOverloads)
Creates an instance.- Parameters:
theArithmetic
- the arithmetic instancetheOverloads
- the overloaded operators
-
-
Method Detail
-
getOperator
public JexlMethod getOperator(JexlOperator operator, java.lang.Object... args)
Description copied from interface:JexlArithmetic.Uberspect
Gets the most specific method for an operator.- Specified by:
getOperator
in interfaceJexlArithmetic.Uberspect
- Parameters:
operator
- the operatorargs
- the arguments- Returns:
- the most specific method or null if no specific override could be found
-
overloads
public boolean overloads(JexlOperator operator)
Description copied from interface:JexlArithmetic.Uberspect
Checks whether this uberspect has overloads for a given operator.- Specified by:
overloads
in interfaceJexlArithmetic.Uberspect
- Parameters:
operator
- the operator to check- Returns:
- true if an overload exists, false otherwise
-
-