Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.javatools.parser.plsql.old.symbol
Class ExpressionSymbol

java.lang.Object
  extended by oracle.javatools.parser.util.ArrayListHeap
      extended by oracle.javatools.parser.plsql.old.symbol.PlsqlSymbol
          extended by oracle.javatools.parser.plsql.old.symbol.ExpressionSymbol
All Implemented Interfaces:
PlsqlSyntaxCodes, PlsqlTokens, Nameable
Direct Known Subclasses:
ExpressionList, ExpressionWrapper

public class ExpressionSymbol
extends PlsqlSymbol
implements Nameable


Field Summary
static int CATEGORY_ARGUMENTS
          This is an arguments list.
static int CATEGORY_INFIX_OPERATOR
          This is an infix operator.
static int CATEGORY_PAREN_WRAPPER
          This is a paren expression.
static int CATEGORY_POSTFIX_OPERATOR
          This is a postfix operator.
static int CATEGORY_PREFIX_OPERATOR
          This is a prefix operator.
static int CATEGORY_PRIMARY
          This is a primary.
static int CATEGORY_SPECIAL_OPERATOR
          This is an operator that is neither a prefix nor an infix operator.
static int CATEGORY_SQL
          This is a sql expression.
static int CATEGORY_UNKNOWN
          We don't know what this expression is.
static int CATEGORY_WRAPPER
          This is an expression wrapper and has one operand which is the actual expression tree.
protected  ExpressionSymbol firstOperand
           
protected  ExpressionSymbol secondOperand
           
protected  ExpressionSymbol thirdOperand
           
 
Fields inherited from class oracle.javatools.parser.plsql.old.symbol.PlsqlSymbol
SYNTAX_EOF, SYNTAX_ERROR, SYNTAX_ROOT
 
Fields inherited from interface oracle.javatools.parser.plsql.old.PlsqlSyntaxCodes
SYNTAX_ARGUMENTS, SYNTAX_BLOCK, SYNTAX_BLOCK_STATEMENT, SYNTAX_CURSOR_DECL, SYNTAX_DATATYPE, SYNTAX_ELSE_CLAUSE, SYNTAX_ELSIF_CLAUSE, SYNTAX_EXCEPTION_HANDLER, SYNTAX_EXP_INNER, SYNTAX_EXP_MIDDLE, SYNTAX_EXP_OUTER, SYNTAX_EXP_STATEMENT, SYNTAX_EXPRESSION, SYNTAX_FOR_LOOP, SYNTAX_FUNCTION, SYNTAX_IF_STATEMENT, SYNTAX_INFIX_OPERATOR, SYNTAX_INSERT_EXPRESSION, SYNTAX_ITEM_DECL, SYNTAX_LABEL, SYNTAX_LITERAL, SYNTAX_LOOP, SYNTAX_LOOP_STATEMENT, SYNTAX_OBJECT_TYPE, SYNTAX_PACKAGE, SYNTAX_PARAMETER, SYNTAX_PARAMETER_LIST, SYNTAX_PAREN_EXPRESSION, SYNTAX_PLSQL_ROOT, SYNTAX_POSTFIX_OPERATOR, SYNTAX_PREFIX_OPERATOR, SYNTAX_PRIMARY, SYNTAX_PRIMARY_NAME, SYNTAX_PROCEDURE, SYNTAX_SCHEMA_NAME, SYNTAX_SELECT_EXPRESSION, SYNTAX_SIMPLE_NAME, SYNTAX_SPECIAL_OPERATOR, SYNTAX_SQL_EXPRESSION, SYNTAX_STATEMENT, SYNTAX_TYPE_CURSOR_DECL, SYNTAX_TYPE_DECL, SYNTAX_TYPE_RECORD_DECL, SYNTAX_TYPE_TABLE_DECL, SYNTAX_TYPE_VARRAY_DECL, SYNTAX_UNPARSED_EXPRESSION, SYNTAX_UNPARSED_LOOP, SYNTAX_UNPARSED_STMT, SYNTAX_VARIABLE_DECL, SYNTAX_WHILE_LOOP
 
Fields inherited from interface oracle.javatools.parser.plsql.old.PlsqlTokens
TK_ASG, TK_ASSOC, TK_AT, TK_ATTRIBUTE, TK_BOOLEAN_LITERAL, TK_CHAR_LITERAL, TK_COLON, TK_COMMA, TK_CONCAT, TK_DIV, TK_DOT, TK_EQ, TK_EXPONENT, TK_FLOAT_LITERAL, TK_GE, TK_GT, TK_IDENTIFIER, TK_INT_LITERAL, TK_INVALID, TK_LE, TK_LLABEL, TK_LPAREN, TK_LT, TK_MINUS, TK_MUL, TK_MULTI_COMMENT, TK_NE, TK_NULL_LITERAL, TK_OUTERJOIN, TK_PLUS, TK_QUOTED_IDENTIFIER, TK_RANGE, TK_RLABEL, TK_RPAREN, TK_SEMI, TK_SINGLE_COMMENT, TKKW_ALL, TKKW_ALTER, TKKW_AND, TKKW_ANY, TKKW_ARRAY, TKKW_AS, TKKW_ASC, TKKW_AT, TKKW_AUTHID, TKKW_AVG, TKKW_BEGIN, TKKW_BETWEEN, TKKW_BFILE, TKKW_BINARY_INTEGER, TKKW_BLOB, TKKW_BODY, TKKW_BOOLEAN, TKKW_BULK, TKKW_BY, TKKW_CASE, TKKW_CHAR, TKKW_CHAR_BASE, TKKW_CHECK, TKKW_CLOB, TKKW_CLOSE, TKKW_CLUSTER, TKKW_COALESCE, TKKW_COLLECT, TKKW_COMMENT, TKKW_COMMIT, TKKW_COMPRESS, TKKW_CONNECT, TKKW_CONSTANT, TKKW_CREATE, TKKW_CURRENT, TKKW_CURRVAL, TKKW_CURSOR, TKKW_DATE, TKKW_DAY, TKKW_DEC, TKKW_DECIMAL, TKKW_DECLARE, TKKW_DEFAULT, TKKW_DELETE, TKKW_DESC, TKKW_DISTINCT, TKKW_DO, TKKW_DROP, TKKW_ELSE, TKKW_ELSIF, TKKW_END, TKKW_EXCEPTION, TKKW_EXCLUSIVE, TKKW_EXECUTE, TKKW_EXISTS, TKKW_EXIT, TKKW_EXTENDS, TKKW_EXTRACT, TKKW_FALSE, TKKW_FETCH, TKKW_FLOAT, TKKW_FOR, TKKW_FORALL, TKKW_FROM, TKKW_FUNCTION, TKKW_GOTO, TKKW_GROUP, TKKW_HAVING, TKKW_HEAP, TKKW_HOUR, TKKW_IF, TKKW_IMMEDIATE, TKKW_IN, TKKW_INDEX, TKKW_INDICATOR, TKKW_INSERT, TKKW_INTEGER, TKKW_INTERFACE, TKKW_INTERSECT, TKKW_INTERVAL, TKKW_INTO, TKKW_IS, TKKW_ISOLATION, TKKW_JAVA, TKKW_LEVEL, TKKW_LIKE, TKKW_LIMITED, TKKW_LOCK, TKKW_LONG, TKKW_LOOP, TKKW_MAX, TKKW_MIN, TKKW_MINUS, TKKW_MINUTE, TKKW_MLSLABEL, TKKW_MOD, TKKW_MODE, TKKW_MONTH, TKKW_NATURAL, TKKW_NATURALN, TKKW_NCHAR, TKKW_NCLOB, TKKW_NEW, TKKW_NEXTVAL, TKKW_NOCOPY, TKKW_NOT, TKKW_NOWAIT, TKKW_NULL, TKKW_NULLIF, TKKW_NUMBER, TKKW_NUMBER_BASE, TKKW_NUMERIC, TKKW_NVARCHAR2, TKKW_OCIROWID, TKKW_OF, TKKW_ON, TKKW_OPAQUE, TKKW_OPEN, TKKW_OPERATOR, TKKW_OPTION, TKKW_OR, TKKW_ORDER, TKKW_ORGANIZATION, TKKW_OTHERS, TKKW_OUT, TKKW_PACKAGE, TKKW_PARTITION, TKKW_PCTFREE, TKKW_PLS_INTEGER, TKKW_POSITIVE, TKKW_POSITIVEN, TKKW_PRAGMA, TKKW_PRIOR, TKKW_PRIVATE, TKKW_PROCEDURE, TKKW_PUBLIC, TKKW_RAISE, TKKW_RANGE, TKKW_RAW, TKKW_REAL, TKKW_RECORD, TKKW_REF, TKKW_RELEASE, TKKW_RETURN, TKKW_REVERSE, TKKW_ROLLBACK, TKKW_ROW, TKKW_ROWID, TKKW_ROWNUM, TKKW_ROWTYPE, TKKW_SAVEPOINT, TKKW_SECOND, TKKW_SELECT, TKKW_SEPARATE, TKKW_SET, TKKW_SHARE, TKKW_SMALLINT, TKKW_SPACE, TKKW_SQL, TKKW_SQLCODE, TKKW_SQLERRM, TKKW_START, TKKW_STDDEV, TKKW_SUBTYPE, TKKW_SUCCESSFUL, TKKW_SUM, TKKW_SYNONYM, TKKW_SYSDATE, TKKW_TABLE, TKKW_THEN, TKKW_TIME, TKKW_TIMESTAMP, TKKW_TIMEZONE_ABBR, TKKW_TIMEZONE_HOUR, TKKW_TIMEZONE_MINUTE, TKKW_TIMEZONE_REGION, TKKW_TO, TKKW_TRIGGER, TKKW_TRUE, TKKW_TYPE, TKKW_UID, TKKW_UNION, TKKW_UNIQUE, TKKW_UPDATE, TKKW_USE, TKKW_USER, TKKW_VALIDATE, TKKW_VALUES, TKKW_VARCHAR, TKKW_VARCHAR2, TKKW_VARIANCE, TKKW_VIEW, TKKW_WHEN, TKKW_WHENEVER, TKKW_WHERE, TKKW_WHILE, TKKW_WITH, TKKW_WORK, TKKW_WRITE, TKKW_YEAR, TKKW_ZONE
 
Method Summary
 int getCategory()
           
 int getExactCode()
           
 ExpressionSymbol getFirstOperand()
           
 NameSymbol getName()
          Gets the name symbol.
 ExpressionSymbol getSecondOperand()
           
 ExpressionSymbol getThirdOperand()
           
 void setName(NameSymbol name)
          Sets the name symbol.
 
Methods inherited from class oracle.javatools.parser.plsql.old.symbol.PlsqlSymbol
getChildren, getCode, getDataValue, getEndOffset, getParent, getStartOffset, isLeafNode, isRootNode
 
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

CATEGORY_WRAPPER

public static final int CATEGORY_WRAPPER
This is an expression wrapper and has one operand which is the actual expression tree. This wrapper provides the start and end offsets for the entire expression. You should see this only as the root of an INPUT_EXPRESSION parse.

See Also:
Constant Field Values

CATEGORY_UNKNOWN

public static final int CATEGORY_UNKNOWN
We don't know what this expression is. Either there was a syntax error or this expression syntax simply hasn't been implemented yet.

See Also:
Constant Field Values

CATEGORY_PAREN_WRAPPER

public static final int CATEGORY_PAREN_WRAPPER
This is a paren expression. The first operand is the actual expression. The reason we have this at all is so that we can preserve the offsets of the parentheses.

See Also:
Constant Field Values

CATEGORY_SQL

public static final int CATEGORY_SQL
This is a sql expression. Right now, you can't retrieve the details of the sql expression. All you can do is getName() to retrieve the NameSymbol representing the string for the entire sql expression.

See Also:
Constant Field Values

CATEGORY_PREFIX_OPERATOR

public static final int CATEGORY_PREFIX_OPERATOR
This is a prefix operator. Call getExactCode() to find out exactly which operator this is. Please refer to PlsqlSyntaxRecognizer.isPrefixOperator().

See Also:
Constant Field Values

CATEGORY_POSTFIX_OPERATOR

public static final int CATEGORY_POSTFIX_OPERATOR
This is a postfix operator. Call getExactCode() to find out exactly which operator this is. Please refer to PlsqlSyntaxRecognizer.isPostfixOperator().

See Also:
Constant Field Values

CATEGORY_INFIX_OPERATOR

public static final int CATEGORY_INFIX_OPERATOR
This is an infix operator. Call getExactCode() to find out exactly which operator this is. For example, if ( getExactCode() == TK_PLUS ) then this is an addition operation. For all infix operators, there will be a firstOperand and secondOperand. Please refer to PlsqlSyntaxRecognizer.isInfixOperator().

See Also:
Constant Field Values

CATEGORY_SPECIAL_OPERATOR

public static final int CATEGORY_SPECIAL_OPERATOR
This is an operator that is neither a prefix nor an infix operator. Call getExactCode() to find out exactly which operator this is. The codes are: (don't neglect the negated cases!) TK_IS firstOp IS NULL - TK_IS firstOp IS NOT NULL TK_BETWEEN firstOp BETWEEN secondOp AND thirdOp - TK_BETWEEN firstOp NOT BETWEEN secondOp AND thirdOp TK_LIKE firstOp LIKE secondOp - TK_LIKE firstOp NOT LIKE secondOp TK_IN firstOp IN secondOp - TK_IN firstOp NOT IN secondOp Note: With the TK_IN operation (and negated operation), the secondOp should be of type CATEGORY_ARGUMENTS.

See Also:
Constant Field Values

CATEGORY_PRIMARY

public static final int CATEGORY_PRIMARY
This is a primary. This object is actually an instance of an ExpressionList. If we have the primary "a.b(i)(j)(k).FIRST", then this ExpressionList will have four operands and the name "a.b". The first three operands will all be CATEGORY_ARGUMENTS expressions, one each for i, j, and k. The fourth operand will be a CATEGORY_PRIMARY expression with name "FIRST".

Examples of primaries are: 1, 'Hello world!', a.b, countkids%FOUND.

There is one special case to this category. The expression "EXISTS( SELECT ... )" is a CATEGORY_PRIMARY expression with name "EXISTS" and with a first operand of type CATEGORY_SQL.

See Also:
Constant Field Values

CATEGORY_ARGUMENTS

public static final int CATEGORY_ARGUMENTS
This is an arguments list. This object is actually an instance of an ExpressionList. Each argument is an operand in the expression list, in the correct order.

See Also:
Constant Field Values

firstOperand

protected ExpressionSymbol firstOperand

secondOperand

protected ExpressionSymbol secondOperand

thirdOperand

protected ExpressionSymbol thirdOperand
Method Detail

getCategory

public int getCategory()
Returns:
the category of this expression. See enumerated constants below. Each constant describes which fields are non-null.

getExactCode

public int getExactCode()
Returns:
the exact token value of this expression symbol as listed in JavaTokens. Used to gather more specific information beyond the category.

getFirstOperand

public ExpressionSymbol getFirstOperand()
Returns:
the ExpressionSymbol representing the first operand. Non-null if this expression is an operator (and hence has operands).

getSecondOperand

public ExpressionSymbol getSecondOperand()
Returns:
the ExpressionSymbol representing the second operand. Non-null if this operator has a second operand.

getThirdOperand

public ExpressionSymbol getThirdOperand()
Returns:
the ExpressionSymbol representing the third operand. Non-null if this is the conditional operator.

getName

public NameSymbol getName()
Description copied from interface: Nameable
Gets the name symbol.

Specified by:
getName in interface Nameable
Returns:
The NameSymbol associated with this object. Null if none.

setName

public void setName(NameSymbol name)
Description copied from interface: Nameable
Sets the name symbol.

Specified by:
setName in interface Nameable

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.