org.glassfish.pfl.dynamic.codegen.impl
Enum ExpressionFactory.BinaryOperator
java.lang.Object
java.lang.Enum<ExpressionFactory.BinaryOperator>
org.glassfish.pfl.dynamic.codegen.impl.ExpressionFactory.BinaryOperator
- All Implemented Interfaces:
- Serializable, Comparable<ExpressionFactory.BinaryOperator>
- Enclosing class:
- ExpressionFactory
public static enum ExpressionFactory.BinaryOperator
- extends Enum<ExpressionFactory.BinaryOperator>
Representation of binary operators.
We only support a limited set of operators as follows:
- Basic arithmetic: PLUS, MINUS, TIMES, DIV, REM
- Relational operators (LT, GT, LE, GE, EQ, NE)
- == and != on references (e.g. obj == null) and
primitives.
- AND and OR on booleans
PLUS
public static final ExpressionFactory.BinaryOperator PLUS
TIMES
public static final ExpressionFactory.BinaryOperator TIMES
DIV
public static final ExpressionFactory.BinaryOperator DIV
MINUS
public static final ExpressionFactory.BinaryOperator MINUS
REM
public static final ExpressionFactory.BinaryOperator REM
GT
public static final ExpressionFactory.BinaryOperator GT
GE
public static final ExpressionFactory.BinaryOperator GE
LT
public static final ExpressionFactory.BinaryOperator LT
LE
public static final ExpressionFactory.BinaryOperator LE
EQ
public static final ExpressionFactory.BinaryOperator EQ
NE
public static final ExpressionFactory.BinaryOperator NE
AND
public static final ExpressionFactory.BinaryOperator AND
OR
public static final ExpressionFactory.BinaryOperator OR
values
public static ExpressionFactory.BinaryOperator[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (ExpressionFactory.BinaryOperator c : ExpressionFactory.BinaryOperator.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static ExpressionFactory.BinaryOperator valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
javaRepresentation
public String javaRepresentation()
create
public abstract Expression create(ExpressionFactory ef,
Expression left,
Expression right)
kind
public ExpressionFactory.BinaryOperatorKind kind()
Copyright © 2013 Oracle. All Rights Reserved.