com.togethersoft.openapi.sci
Interface SciReferenceExpression
- All Known Subinterfaces:
- SciTypeExpression
- public interface SciReferenceExpression
- extends SciExpression, SciReference
An expression which is a reference.
For example:
someObject.someMethod();
It is SciFunctionCallExpression. Method SciFuncionCallExpression.getFunction will
return SciMemberAccessExpression instance for someObject.someMethod.
Next, SciMemberAccessExpression.getObject and
SciMemberAccessExpression.getFunction
methods will return SciExpressions
for someObject and someMethod respectively.
And these SciExpressions will be instances of
SciReferenceExpression! :)
Another example, a little bit simpler:
someMethod();
It is SciFunctionCallExpression. The method SciFuncionCallExpression.getFunction
will return SciExpression for someMethod. This
SciExpression is an
instance of SciReferenceExpression.
Now it is possibe to obtain SciOperation representing someMethod()
via the getReferencedElement method inherited by this interface from SciReference.
Since this interface inherits from SciReference and SciExpression, it
contains all the methods they have, and can be treated as a reference or as an expression depending
on the situation.
- Author:
- TogetherSoft
- Since: Together 3.0
- See Also: SciExpression, SciReference, SciFunctionCallExpression, SciMemberAccessExpression
| Methods inherited from interface com.togethersoft.openapi.sci.SciObject |
canCut, canDelete, canReplace, copy, cut, delete, getContainingFile, getContainingScope, getLanguage, getPositions, getText, getUserProperty, isReadOnly, replace, setUserProperty |