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 the someObject and someMethod respectively. And these SciExpressions will be instances of SciReferenceExpression! :)

Another example, a little bit simpler:


 someMethod();
It is SciFunctionCallExpression. Method SciFuncionCallExpression.getFunction will return SciExpression for the someMethod. This SciExpression is an instance of SciReferenceExpression. Now it is possibe to obtain SciOperation representing someMethod() via 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
See Also: SciExpression, SciReference, SciFunctionCallExpression, SciMemberAccessExpression

Methods inherited from interface com.togethersoft.openapi.sci.SciExpression
accept, getKind, getParent, getType, operands, visitReferences, visitReferences

Methods inherited from interface com.togethersoft.openapi.sci.SciObject
canCut, canDelete, canReplace, copy, cut, delete, getContainingFile, getContainingScope, getLanguage, getPositions, getText, getUserProperty, isReadOnly, replace, setUserProperty

Methods inherited from interface com.togethersoft.openapi.sci.SciReference
canSetReferencedElement, canSetReferenceText, getReferencedElement, getReferenceText, setReferencedElement, setReferenceText