public enum Op extends Enum<Op>
| Modifier and Type | Method and Description |
|---|---|
Value |
apply(ParseSession session,
Value... args)
Apply this operator to the given parameters.
|
static Op |
forSymbol(String symbol)
Get the
Op corresponding to the given symbol. |
int |
getArity()
Get the arity of this symbol.
|
String |
getSymbol()
Get the symbol associated with this operator.
|
static Op |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Op[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Op ARRAY_ACCESS
public static final Op MEMBER_ACCESS
public static final Op INVOKE_METHOD
public static final Op POST_INCREMENT
public static final Op POST_DECREMENT
public static final Op PRE_INCREMENT
public static final Op PRE_DECREMENT
public static final Op UNARY_PLUS
public static final Op UNARY_MINUS
public static final Op LOGICAL_NOT
public static final Op INVERT
public static final Op CAST
public static final Op MULTIPLY
public static final Op DIVIDE
public static final Op MODULO
public static final Op PLUS
public static final Op MINUS
public static final Op LSHIFT
public static final Op RSHIFT
public static final Op URSHIFT
public static final Op LT
public static final Op GT
public static final Op LTEQ
public static final Op GTEQ
public static final Op INSTANCEOF
public static final Op EQUAL
public static final Op NOT_EQUAL
public static final Op AND
public static final Op OR
public static final Op XOR
public static final Op LOGICAL_AND
public static final Op LOGICAL_OR
public static final Op CONDITIONAL
public static final Op EQUALS
public static final Op PLUS_EQUALS
public static final Op MINUS_EQUALS
public static final Op MULTIPLY_EQUALS
public static final Op DIVIDE_EQUALS
public static final Op MODULO_EQUALS
public static final Op AND_EQUALS
public static final Op XOR_EQUALS
public static final Op OR_EQUALS
public static final Op LSHIFT_EQUALS
public static final Op RSHIFT_EQUALS
public static final Op URSHIFT_EQUALS
public static Op[] values()
for (Op c : Op.values()) System.out.println(c);
public static Op valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getArity()
public String getSymbol()
public Value apply(ParseSession session, Value... args)
session - current sessionargs - operator argumentsIllegalArgumentException - if args contains inappropriate value(s)IllegalArgumentException - if the length of args does not match this operatorpublic static Op forSymbol(String symbol)
Op corresponding to the given symbol.
Note: some symbols correspond to multiple Ops:
+ or -, the binary operator is returned++ or --, the post-increment operator is returnedsymbol - symbolIllegalArgumentException - if no such Op existsCopyright © 2017. All rights reserved.