com.togethersoft.openapi.sci.visitor
Interface SciStatementVisitor

All Known Implementing Classes:
SciStatementVisitorAdapter

public interface SciStatementVisitor

Visitor design pattern implementation for SciStatements.


It defines defferent methods for visiting different kinds of statements (declaration
statement, return statement etc.).
These methods are called up from SciStatement.accept method which determines the
kind of the statement and runs this visitor's corresponding method, passing the statement as a parameter.


For example, this command


someSciDeclarationStatement.accept(mySciStatementVisitor); //mySciStatementVisitor implements SciStatementVisitor

will call mySciStatementVisitor.visitDeclarationStatement(SciDeclarationStatement) method, passing
someSciDeclarationStatement to it.


The methods of this interface can be also called from
SciScope.visitStatements methods.


Every method returns a result of its actions. It can be null if it is not required from this
visitor to return any information.

Author:
TogetherSoft
Since: Together 3.0
See Also: com.togethersoft.openapi.sci.SciStatement.accept(com.togethersoft.openapi.sci.visitor.SciStatementVisitor), SciStatementVisitorAdapter, com.togethersoft.openapi.sci.visitor

Method Summary
 ObjectvisitAssertStatement(SciAssertStatement sciAssertStatement)
          Performs an action upon SciAssertStatement.
 ObjectvisitCaseStatement(SciCaseStatement sciCaseStatement)
          Performs an action upon SciCaseStatement.
 ObjectvisitCatchBlockStatement(SciCatchBlockStatement sciCatchBlockStatement)
          Performs an action upon SciCatchBlockStatement.
 ObjectvisitCompoundStatement(SciCompoundStatement sciCompoundStatement)
          Performs an action upon SciCompoundStatement.
 ObjectvisitDeclarationStatement(SciDeclarationStatement sciDeclarationStatement)
          Performs an action upon SciDeclarationStatement.
 ObjectvisitEventHandlingStatement(SciEventHandlingStatement sciStatement)
          Performs an action upon SciEventHandlingStatement.
 ObjectvisitExpressionListStatement(SciExpressionListStatement sciStatement)
          Performs an action upon SciExpressionListStatement.
 ObjectvisitExpressionStatement(SciExpressionStatement sciExpressionStatement)
          Performs an action upon SciExpressionStatement.
 ObjectvisitIfStatement(SciIfStatement sciIfStatement)
          Performs an action upon SciIfStatement.
 ObjectvisitLoopStatement(SciLoopStatement sciLoopStatement)
          Performs an action upon SciLoopStatement.
 ObjectvisitReturnStatement(SciReturnStatement sciReturnStatement)
          Performs an action upon SciReturnStatement.
 ObjectvisitStatement(SciStatement sciStatement)
          Performs an action upon SciStatement.
 ObjectvisitSwitchStatement(SciSwitchStatement sciSwitchStatement)
          Performs an action upon SciSwitchStatement.
 ObjectvisitThrowStatement(SciThrowStatement sciThrowStatement)
          Performs an action upon SciThrowStatement.
 ObjectvisitTryStatement(SciTryStatement sciTryStatement)
          Performs an action upon SciTryStatement.

Method Detail

visitAssertStatement

public Object visitAssertStatement(SciAssertStatement sciAssertStatement)
Performs an action upon SciAssertStatement.
Parameters:
sciAssertStatement - the SciAssertStatement which is the subject for the action
Returns: a visitor-specific result

visitCaseStatement

public Object visitCaseStatement(SciCaseStatement sciCaseStatement)
Performs an action upon SciCaseStatement.
Parameters:
sciReturnStatement the SciReturnStatement which is the subject for the action
Returns: a visitor-specific result

visitCatchBlockStatement

public Object visitCatchBlockStatement(SciCatchBlockStatement sciCatchBlockStatement)
Performs an action upon SciCatchBlockStatement.
Parameters:
sciCatchBlockStatement the SciCatchBlockStatement which is the subject for the action
Returns: a visitor-specific result

visitCompoundStatement

public Object visitCompoundStatement(SciCompoundStatement sciCompoundStatement)
Performs an action upon SciCompoundStatement.
Parameters:
sciCompoundStatement the SciCompoundStatement which is the subject for the action
Returns: a visitor-specific result

visitDeclarationStatement

public Object visitDeclarationStatement(SciDeclarationStatement sciDeclarationStatement)
Performs an action upon SciDeclarationStatement.
Parameters:
sciDeclarationStatement the SciDeclarationStatement which is the subject for the action
Returns: a visitor-specific result

visitEventHandlingStatement

public Object visitEventHandlingStatement(SciEventHandlingStatement sciStatement)
Performs an action upon SciEventHandlingStatement.
Parameters:
sciStatement the SciEventHandlingStatement which is the subject for the action
Returns: a visitor-specific result

visitExpressionListStatement

public Object visitExpressionListStatement(SciExpressionListStatement sciStatement)
Performs an action upon SciExpressionListStatement.
Parameters:
sciStatement the SciExpressionListStatement which is the subject for the action
Returns: a visitor-specific result

visitExpressionStatement

public Object visitExpressionStatement(SciExpressionStatement sciExpressionStatement)
Performs an action upon SciExpressionStatement.
Parameters:
sciExpressionStatement the SciExpressionStatement which is the subject for the action
Returns: a visitor-specific result

visitIfStatement

public Object visitIfStatement(SciIfStatement sciIfStatement)
Performs an action upon SciIfStatement.
Parameters:
sciIfStatement the SciIfStatement which is the subject for the action
Returns: a visitor-specific result

visitLoopStatement

public Object visitLoopStatement(SciLoopStatement sciLoopStatement)
Performs an action upon SciLoopStatement.
Parameters:
sciLoopStatement the SciLoopStatement which is the subject for the action
Returns: a visitor-specific result

visitReturnStatement

public Object visitReturnStatement(SciReturnStatement sciReturnStatement)
Performs an action upon SciReturnStatement.
Parameters:
sciReturnStatement the SciReturnStatement which is the subject for the action
Returns: a visitor-specific result

visitStatement

public Object visitStatement(SciStatement sciStatement)
Performs an action upon SciStatement.
Parameters:
sciStatement the SciStatement which is the subject for the action
Returns: a visitor-specific result

visitSwitchStatement

public Object visitSwitchStatement(SciSwitchStatement sciSwitchStatement)
Performs an action upon SciSwitchStatement.
Parameters:
sciSwitchStatement the SciSwitchStatement which is the subject for the action
Returns: a visitor-specific result

visitThrowStatement

public Object visitThrowStatement(SciThrowStatement sciThrowStatement)
Performs an action upon SciThrowStatement.
Parameters:
sciReturnStatement the SciThrowStatement which is the subject for the action
Returns: a visitor-specific result

visitTryStatement

public Object visitTryStatement(SciTryStatement sciTryStatement)
Performs an action upon SciTryStatement.
Parameters:
sciTryStatement the SciTryStatement which is the subject for the action
Returns: a visitor-specific result