| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
SciExpression represents all posible types of expressions in a source code.
It also provides common methods for all types of expressions, allowing to get information about the kind of an expression, its type, parent expression.
Every SciExpression's derivative inherits the accept(SciExpressionVisitor) method which
runs visitor's visitXXX method corresponding to the kind of this expression.
visitReferences(SciReferenceVisitor) and
visitReferences(SciReferenceVisitor, SciElement) methods are used to perform
actions upon references taking place in this expresssion.
| Method Summary | |
Object | accept(SciExpressionVisitor visitor)"Accepts" a visitor, calling up its visitXXX method corresponding to the kind of this expression. |
int | getKind()Returns an integer value representing the kind of this expression. |
SciExpression | getParent()Returns an expression in which this expression plays a role of an operand. |
SciType | getType()Returns SciType instance for this expression. |
SciExpressionEnumeration | operands() |
void | visitReferences(SciReferenceVisitor visitor)In this expression, makes a specified visitor perform certain actions upon all references. |
void | visitReferences(SciReferenceVisitor visitor, SciElement referencedElement)In this expression, makes a specified visitor perform certain actions upon all references to the specified element. |
| Methods inherited from interface com.togethersoft.openapi.sci.SciObject |
canCut, canDelete, canReplace, copy, cut, delete, getContainingFile, getContainingScope, getLanguage, getPositions, getText, getUserProperty, isReadOnly, replace, setUserProperty |
| Method Detail |
public Object accept(SciExpressionVisitor visitor)
visitXXX method corresponding to the kind of this expression.SciExpressionVisitor type visitorpublic int getKind()
SciExpressionKind inteface.public SciExpression getParent()
null
if this expression isn't an operand of an upper-level expression.
For example, for the SciFunctionCallExpression representing
a call of a someMethod() in this line of code:
myObject.someMethod();
the getParent() method will return SciExpression being an instance of
SciMemberAccessExpression.public SciType getType()
SciType instance for this expression.SciType instance for this expressionpublic SciExpressionEnumeration operands()
public void visitReferences(SciReferenceVisitor visitor)
SciReferenceVisitor which will perform certain actions
upon all references in this expressionpublic void visitReferences(SciReferenceVisitor visitor, SciElement referencedElement)
SciReferenceVisitor which will perform certain actions
upon all references to the specified elementSciElement, references to which are subject for the actions
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||