public class Instruction extends Object
Constructor and Description |
---|
Instruction(int line)
New instruction at the given line.
|
Modifier and Type | Method and Description |
---|---|
void |
addBranch()
Adds an branch to this instruction.
|
int |
getBranches()
Returns the total number of branches starting from this instruction.
|
int |
getCoveredBranches()
Returns the number of covered branches starting from this instruction.
|
int |
getLine()
Returns the source line this instruction belongs to.
|
void |
setCovered()
Marks one branch of this instruction as covered.
|
void |
setPredecessor(Instruction predecessor)
Sets the given instruction as a predecessor of this instruction.
|
public Instruction(int line)
line
- source line this instruction belongs topublic void addBranch()
public void setPredecessor(Instruction predecessor)
predecessor
- predecessor instructionaddBranch()
public void setCovered()
public int getLine()
public int getBranches()
public int getCoveredBranches()
Copyright © 2013. All rights reserved.