|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.util.Enum
polyglot.ast.Precedence
public class Precedence
Constants defining the precedence of an expression. Higher values denote higher precedence (i.e., tighter binding).
Field Summary | |
---|---|
static Precedence |
ADD
The precedence of a + when applied to numbers, and the precedence of - . |
static Precedence |
ASSIGN
The precedence of assignment expressions. |
static Precedence |
BIT_AND
The precedence of bitwise AND ( & |
static Precedence |
BIT_OR
The precedence of bitwise OR ( | |
static Precedence |
BIT_XOR
The precedence of bitwise XOR ( ^ |
static Precedence |
CAST
The precedence of a cast expression. |
static Precedence |
COND_AND
The precedence of conditional AND ( && |
static Precedence |
COND_OR
The precedence of conditional OR ( || |
static Precedence |
CONDITIONAL
The precedence of ternary conditional expressions. |
static Precedence |
EQUAL
The precedence of equality operators. |
static Precedence |
INSTANCEOF
The precedence of instanceof expressions. |
static Precedence |
LITERAL
The precedence of a literal |
static Precedence |
MUL
The precedence of a * , / , or % expression. |
static Precedence |
RELATIONAL
The precedence of the relational expressions < , > , <= , and >= . |
static Precedence |
SHIFT
The precedence of the shift expressions << , >> , and >>> . |
static Precedence |
STRING_ADD
The precedence of a + when applied to Strings. |
static Precedence |
UNARY
The precedence of a unary expression. |
static Precedence |
UNKNOWN
The precedence of all other expressions. |
Constructor Summary | |
---|---|
Precedence(java.lang.String name,
int value)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Returns true if this and p have the same precedence. |
boolean |
equals(Precedence p)
Returns true if this and p have the same precedence. |
int |
hashCode()
|
boolean |
isTighter(Precedence p)
Returns true if this binds tighter than p. |
Methods inherited from class polyglot.util.Enum |
---|
intern, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Precedence LITERAL
public static final Precedence UNARY
public static final Precedence CAST
public static final Precedence MUL
*
, /
, or %
expression.
public static final Precedence STRING_ADD
+
when applied to Strings. This is of higher precedence than +
applied to numbers.
public static final Precedence ADD
+
when applied to numbers, and the precedence of -
.
public static final Precedence SHIFT
<<
, >>
, and >>>
.
public static final Precedence RELATIONAL
<
, >
, <=
, and >=
.
public static final Precedence INSTANCEOF
instanceof
expressions.
public static final Precedence EQUAL
==
and !=
expressions.
public static final Precedence BIT_AND
&) expressions.
BIT_XOR
public static final Precedence BIT_XOR
- The precedence of bitwise XOR (
^) expressions.
BIT_OR
public static final Precedence BIT_OR
- The precedence of bitwise OR (
|) expressions.
COND_AND
public static final Precedence COND_AND
- The precedence of conditional AND (
&&) expressions.
COND_OR
public static final Precedence COND_OR
- The precedence of conditional OR (
||) expressions.
CONDITIONAL
public static final Precedence CONDITIONAL
- The precedence of ternary conditional expressions.
ASSIGN
public static final Precedence ASSIGN
- The precedence of assignment expressions.
UNKNOWN
public static final Precedence UNKNOWN
- The precedence of all other expressions. This has the lowest precedence to ensure the expression is parenthesized on output.
Constructor Detail
Precedence
public Precedence(java.lang.String name,
int value)
Method Detail
hashCode
public int hashCode()
- Overrides:
hashCode
in class Enum
equals
public boolean equals(java.lang.Object o)
- Returns true if this and p have the same precedence.
- Overrides:
equals
in class Enum
equals
public boolean equals(Precedence p)
- Returns true if this and p have the same precedence.
isTighter
public boolean isTighter(Precedence p)
- Returns true if this binds tighter than p.
Overview
Package
Class
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD