com.togethersoft.openapi.sci
Interface SciStatement

All Known Subinterfaces:
SciAssertStatement, SciCaseStatement, SciCatchBlockStatement, SciCompoundStatement, SciDeclarationStatement, SciEventHandlingStatement, SciExpressionListStatement, SciExpressionStatement, SciIfStatement, SciLoopStatement, SciParametrizedCompoundStatement, SciReturnStatement, SciSwitchStatement, SciThrowStatement, SciTryStatement

public interface SciStatement
extends SciObject

A statement in the source code. Represents a single statement of source code located in the body of a function or in a code block.

Each statement has a kind accoring to the language semantic (like if, loop, declaration, etc).
These kinds are denoted by constants defined in SciStatementKind interface.

One can access statements located in particular code block by call statements()
operation of corresponding SciCodeBlock object.
Call to paste() operation of SciCodeBlock object
allows to add statements into code blocks.

New statements may be created by call to newStatement() operation
of SciGenericFactory object.

Operations copy(), cut(), replace()
of SciObject are not implemented for statements yet.

Author:
TogetherSoft
Since: Together 3.0
See Also: SciStatementKind, SciCodeBlock.statements(), SciGenericFactory.newStatement(java.lang.String), SciScope.visitStatements(com.togethersoft.openapi.sci.visitor.SciStatementVisitor), SciStatementEnumeration, SciStatementVisitor

Method Summary
 Objectaccept(SciStatementVisitor visitor)
           
 SciCodeBlockgetContainingBlock()
           
 intgetKind()
          Return kind of this statement (one of the constants defined in SciStatementKind).
 voidvisitExpressions(SciExpressionVisitor visitor)
           
 voidvisitExpressions(SciExpressionVisitor visitor, int expressionKind)
           
 voidvisitReferences(SciReferenceVisitor visitor)
           
 voidvisitReferences(SciReferenceVisitor visitor, SciElement referencedElement)
           

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

accept

public Object accept(SciStatementVisitor visitor)

getContainingBlock

public SciCodeBlock getContainingBlock()

getKind

public int getKind()
Return kind of this statement (one of the constants defined in SciStatementKind).
Returns: kind of this statement
See Also:
SciStatementKind

visitExpressions

public void visitExpressions(SciExpressionVisitor visitor)

visitExpressions

public void visitExpressions(SciExpressionVisitor visitor, int expressionKind)

visitReferences

public void visitReferences(SciReferenceVisitor visitor)

visitReferences

public void visitReferences(SciReferenceVisitor visitor, SciElement referencedElement)