com.pnfsoftware.jeb.core.units.code.java.IJavaBlock |
Java AST interface to represent a sequence of statements
.
Example:
{ stm0; stm1; stm2; }
Statements cannot be null. The following methods will raise if attempts to insert null statements are detected.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
add(IStatement stm)
Append a statement to this block.
| ||||||||||
abstract IStatement |
get(int index)
Get the statement at a given index.
| ||||||||||
abstract void |
insert(int index, IStatement stm)
Insert a statement at the given index.
| ||||||||||
abstract IStatement |
remove(int index)
Pull a statement from the block.
| ||||||||||
abstract void |
set(int index, IStatement stm)
Replace a statement by another statement.
| ||||||||||
abstract int |
size()
Get the number of statements in this block.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Append a statement to this block.
stm | mandatory statement to be appended |
---|
Get the statement at a given index.
index | 0-based statement index |
---|
Insert a statement at the given index.
index | 0-based statement index |
---|---|
stm | mandatory statement to be inserted |
Pull a statement from the block.
index | 0-based statement index |
---|
Replace a statement by another statement.
index | 0-based statement index |
---|---|
stm | mandatory statement |
Get the number of statements in this block.
Note: Compound statements
count for a single statement.