Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.sci
Interface SciCodeBlock

public interface SciCodeBlock
extends SciScope

A block of a source code.

For example, the body of an operation is represented by the `SciCodeBlock` object. It can be obtained using the SciFunction.getBody method.

Since this interface is an inheritor of `SciObject`, it is possible to get a containing `SciScope` for this code block, using `getContainingScope` method. This method returns either `SciFile`, `SciClass` or other `SciCodeBlock`. For example, for the inner code block:

     MyClass extends BigClass{
      void myMethod{
        for (i=0;i<10;i++) {
          //this is the inner code block
        }
      }
     }

the `getContainingScope` method will return `SciCodeBlock` for the body of `myMethod`. And the same `getContainingScope` method for that code block will return `SciClass` for `MyClass` class.

Once again, since this interface is an inheritor of `SciObject`, you can use the SciObject.getText method to get a string with the text of this code block.

Author:
  TogetherSoft
See Also: SciScope, SciClass, SciFile

Method Summary
`SciStatementEnumeration` | `statements()` Returns an enumeration of all statements taking place in this block of a source code.

Methods inherited from interface com.togethersoft.openapi.sci.SciScope
`declaredElements, visitExpressions, visitExpressions, visitReferences, visitReferences, visitStatements, visitStatements`

Methods inherited from interface com.togethersoft.openapi.sci.SciContainer
`canPaste, objects, paste`

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

### statements

    public SciStatementEnumeration statements()

  Returns an enumeration of all statements taking place in this block of a source code.
  Returns: an enumeration of all statements taking place in this block of a source code

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD