public class Instruction
extends java.lang.Object
Constructor | Description |
---|---|
Instruction(org.objectweb.asm.tree.AbstractInsnNode node,
int line) |
New instruction at the given line.
|
Modifier and Type | Method | 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.
|
org.objectweb.asm.tree.AbstractInsnNode |
getNode() |
|
void |
merge(Instruction instruction) |
Merges information about covered branches of given instruction into this
instruction.
|
void |
setCovered(int branch) |
Marks one branch of this instruction as covered.
|
void |
setPredecessor(Instruction predecessor,
int branch) |
Sets the given instruction as a predecessor of this instruction and adds
branch to the predecessor.
|
java.lang.String |
toString() |
public Instruction(org.objectweb.asm.tree.AbstractInsnNode node, int line)
node
- corresponding nodeline
- source line this instruction belongs topublic org.objectweb.asm.tree.AbstractInsnNode getNode()
public void addBranch()
public void setPredecessor(Instruction predecessor, int branch)
predecessor
- predecessor instructionbranch
- branch number in predecessor that should be marked as covered
when this instruction marked as coveredaddBranch()
public void setCovered(int branch)
branch
- branch number to mark as coveredpublic int getLine()
public int getBranches()
public int getCoveredBranches()
public void merge(Instruction instruction)
instruction
- instruction from which to mergepublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2018. All rights reserved.