Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.parser.java.v2.model.expression
Interface SourceExpression

All Superinterfaces:
CompiledExpression, Element, JavaElement, JavaHasType, SourceElement
All Known Subinterfaces:
SourceAnnotationExpression, SourceArrayAccessExpression, SourceAssignmentExpression, SourceDereferenceExpression, SourceDotExpression, SourceInfixExpression, SourceInvokeExpression, SourceListExpression, SourceLiteralExpression, SourceMethodCallExpression, SourceNewArrayExpression, SourceNewClassExpression, SourceOperatorExpression, SourceQuestionExpression, SourceSimpleNameExpression, SourceTypecastExpression, SourceTypeExpression, SourceUnaryExpression, SourceWrapperExpression

public interface SourceExpression
extends SourceElement, CompiledExpression

The SourceExpression 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 SourceExpression[] EMPTY_ARRAY
           

 

Fields inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT

 

Method Summary
 java.lang.Object getConstantValue()
          Determine if this expression is a constant expression, and if so, compute the constant value of this expression
 int getExpressionCode()
           
 SourceExpression getFirstOperand()
           
 SourceExpression getOperandAt(int index)
          Gets the operand at the specified index in the operand array.
 int getOperandCount()
           
 java.util.List<SourceExpression> getOperands()
           
 int getOperatorCode()
          Same thing as getExpressionCode().
 SourceExpression getSecondOperand()
           
 SourceExpression getThirdOperand()
           

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
addSelf, addSelf, addSelfAfter, addSelfBefore, adjustTextIndentation, clearBinding, cloneSelf, compile, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getEndOffset, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, hasErrors, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelf

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.expression.CompiledExpression
getResolvedObject

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasType
getResolvedType, getUnresolvedType

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaElement
getElementKind, getFile, getModifiers, getOwner, getSourceElement, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfo

 

Field Detail

EMPTY_ARRAY

static final SourceExpression[] EMPTY_ARRAY

Method Detail

getConstantValue

java.lang.Object getConstantValue()
Determine if this expression is a constant expression, and if so, compute the constant value of this expression
Returns:
An Object representing the constant value of this expression or null if this expression is not a constant expression

getExpressionCode

int getExpressionCode()
Returns:
One of the OPT_* constants exactly identifying what kind of expression this is. Valid values are found in JavaOperators.

getOperatorCode

int getOperatorCode()
Same thing as getExpressionCode(). Provided in case that's the first appropriate method a client would have expected.

getFirstOperand

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

getSecondOperand

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

getThirdOperand

SourceExpression getThirdOperand()
Returns:
the SourceExpression representing the third operand. Non-null if this has a third operand, e.g. "x? x: x".

getOperands

java.util.List<SourceExpression> getOperands()
Returns:
the array of SourceExpressions. Always non-null. May be zero-length. Returns a collection of SourceExpressions.

getOperandCount

int getOperandCount()
Returns:
The size of the operand array.

getOperandAt

SourceExpression getOperandAt(int index)
Gets the operand at the specified index in the operand array.
Parameters:
index - 0-based.
Returns:
Null if the indicated operand doesn't exist.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


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