Package com.mebigfatguy.fbcontrib.detect
Class BuryingLogic.IfBlocks
- java.lang.Object
-
- com.mebigfatguy.fbcontrib.detect.BuryingLogic.IfBlocks
-
- Enclosing class:
- BuryingLogic
static class BuryingLogic.IfBlocks extends java.lang.Object
represents all the if blocks in a method
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Deque<BuryingLogic.IfBlock>
blocks
-
Constructor Summary
Constructors Constructor Description IfBlocks()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(BuryingLogic.IfBlock block)
void
clear()
int
countBlockEndsAtPC(int pc)
counts all blocks including nested block that are closed off at the current pcBuryingLogic.IfBlock
getBlockAt(int pc)
boolean
isEmpty()
void
removeLoopBlocks(int target)
remove all if blocks that are contained within a loop, once that loop has endedjava.lang.String
toString()
-
-
-
Field Detail
-
blocks
private java.util.Deque<BuryingLogic.IfBlock> blocks
-
-
Method Detail
-
add
public void add(BuryingLogic.IfBlock block)
-
getBlockAt
@Nullable public BuryingLogic.IfBlock getBlockAt(int pc)
-
clear
public void clear()
-
isEmpty
public boolean isEmpty()
-
removeLoopBlocks
public void removeLoopBlocks(int target)
remove all if blocks that are contained within a loop, once that loop has ended- Parameters:
target
- the start of the loop block
-
countBlockEndsAtPC
public int countBlockEndsAtPC(int pc)
counts all blocks including nested block that are closed off at the current pc- Parameters:
pc
- the current pc- Returns:
- how many blocks have ended at the pc
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-