|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.1.0) E13403-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.javatools.parser.util.ArrayListHeap
oracle.javatools.parser.java.v1.symbol.JavaSymbol
oracle.javatools.parser.java.v1.symbol.ExpressionSymbol
public class ExpressionSymbol
The ExpressionSymbol is essentially the union of all the various operators and primaries. If it is a primary, selector, or method invocation, it has a name. Otherwise, it is an operator of some sort and has operands. With each enumerated constant is a description of which fields are non-null and useful.
Field Summary | |
---|---|
static int |
CATEGORY_ARGUMENTS
This is an argument list and is an ExpressionList object. |
static int |
CATEGORY_ARRAY_CONSTANT
This is an array constant and is an ExpressionList object. |
static int |
CATEGORY_ASG_OPERATOR
This is an assignment operator and has two operands. |
static int |
CATEGORY_BRACKET_DEREFERENCE
This is an array dereference and has two operands. |
static int |
CATEGORY_CONSTANT
This is a primary (or a selector) that is a literal. |
static int |
CATEGORY_CREATOR
This is a creator (the 'new' operator) and is a CreatorExpressionSymbol. |
static int |
CATEGORY_DOT_OPERATOR
This is the dot operator and has two operands. |
static int |
CATEGORY_INFIX_OPERATOR
This is an infix operator and has two operands. |
static int |
CATEGORY_PAREN_WRAPPER
This is an expression wrapper indicating that the single operand of this expression is contained within a matched set of parenthesis. |
static int |
CATEGORY_POSTFIX_OPERATOR
This is a postfix operator and has one operand. |
static int |
CATEGORY_PREFIX_OPERATOR
This is a prefix operator (but not a typecast) and has one operand. |
static int |
CATEGORY_PRIMARY
This is a primary (or a selector) that is not a literal: an identifier, 'class', 'super', 'this', 'void', or a primitive type. |
static int |
CATEGORY_PRIMARY_BRACKETS
These are empty brackets used to indicate a type and has one operand which is the primary. |
static int |
CATEGORY_QUES_OPERATOR
This is the question-colon operator and has three operands. |
static int |
CATEGORY_TYPECAST
Though the typecast is a prefix operator in Java, it has been separated into a different category to make this API a little easier to use. |
static int |
CATEGORY_UNPARSED
This is an unparsed expression. |
static int |
CATEGORY_WRAPPER
This is an expression wrapper and has one operand which is the actual expression tree. |
protected ExpressionSymbol |
firstOperand
The direct operand that we're wrapping. |
Fields inherited from interface oracle.javatools.parser.util.ExpressionObject |
---|
ATOM, INFIX_OP, LEFT_ASSOC, MAX_PRECEDENCE, NON_ASSOC, POSTFIX_OP, PREFIX_OP, RIGHT_ASSOC, TERNARY_OP |
Method Summary | |
---|---|
void |
addOperand(ExpressionObject o)
Adds an operand to this operator object. |
int |
classify()
Returns the whether an ExpressionObject is an atom, a prefix operator, an infix operator, or a postfix operator. |
void |
closeOperator(java.lang.Object o)
Called after all operands have been added to allow post-processing. |
int |
getAssociativity()
Returns the associativity of this operator according to the above constants. |
int |
getCategory()
|
int |
getDataValue()
|
int |
getExactCode()
|
ExpressionSymbol[] |
getExpressions()
|
ExpressionSymbol |
getFirstOperand()
|
int |
getIndex()
|
NameSymbol |
getName()
Gets the name symbol. |
int |
getPrecedence()
Returns a positive number representing the precedence of this ExpressionObject operator. |
static int |
getPrecedence(int value,
boolean prefix)
|
ExpressionSymbol |
getSecondOperand()
|
ExpressionSymbol |
getThirdOperand()
|
TypeSymbol |
getTypecast()
|
boolean |
isFilledIn()
Depending on the type of parse the client requested, ExpressionSymbols for variable initializers may be unfilled. |
void |
setName(NameSymbol name)
Sets the name symbol. |
Methods inherited from class oracle.javatools.parser.java.v1.symbol.JavaSymbol |
---|
getCode, getEndOffset, getParent, getStartOffset |
Methods inherited from class oracle.javatools.parser.util.ArrayListHeap |
---|
allocArrayList, freeArrayList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CATEGORY_UNPARSED
public static final int CATEGORY_WRAPPER
public static final int CATEGORY_ASG_OPERATOR
public static final int CATEGORY_QUES_OPERATOR
public static final int CATEGORY_INFIX_OPERATOR
public static final int CATEGORY_PREFIX_OPERATOR
public static final int CATEGORY_TYPECAST
public static final int CATEGORY_POSTFIX_OPERATOR
public static final int CATEGORY_DOT_OPERATOR
public static final int CATEGORY_ARGUMENTS
public static final int CATEGORY_BRACKET_DEREFERENCE
public static final int CATEGORY_PRIMARY
public static final int CATEGORY_CREATOR
public static final int CATEGORY_PRIMARY_BRACKETS
public static final int CATEGORY_CONSTANT
public static final int CATEGORY_ARRAY_CONSTANT
public static final int CATEGORY_PAREN_WRAPPER
protected ExpressionSymbol firstOperand
Method Detail |
---|
public boolean isFilledIn()
public int getCategory()
public int getExactCode()
public TypeSymbol getTypecast()
public ExpressionSymbol getFirstOperand()
public ExpressionSymbol getSecondOperand()
public ExpressionSymbol getThirdOperand()
public ExpressionSymbol[] getExpressions()
public int getDataValue()
public int getIndex()
public int classify()
ExpressionObject
classify
in interface ExpressionObject
public int getPrecedence()
ExpressionObject
getPrecedence
in interface ExpressionObject
public int getAssociativity()
ExpressionObject
getAssociativity
in interface ExpressionObject
public void addOperand(ExpressionObject o)
ExpressionObject
addOperand
in interface ExpressionObject
public void closeOperator(java.lang.Object o)
ExpressionObject
closeOperator
in interface ExpressionObject
o
- The closing argument passed to the ExpressionStack.public NameSymbol getName()
Nameable
getName
in interface Nameable
public void setName(NameSymbol name)
Nameable
setName
in interface Nameable
public static int getPrecedence(int value, boolean prefix)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.1.0) E13403-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |