public class Block extends AbstractStructuredStatement
| Modifier and Type | Field and Description |
|---|---|
private BlockIdentifier |
blockIdentifier |
private java.util.LinkedList<Op04StructuredStatement> |
containedStatements |
private boolean |
indenting |
| Constructor and Description |
|---|
Block(java.util.LinkedList<Op04StructuredStatement> containedStatements,
boolean indenting) |
Block(java.util.LinkedList<Op04StructuredStatement> containedStatements,
boolean indenting,
BlockIdentifier blockIdentifier) |
Block(Op04StructuredStatement statement) |
addLoc, canDefine, canFall, claimBlock, fallsNopToNext, findCreatedHere, getContainer, getLoc, informBlockHeirachy, isProperlyStructured, setContainer, suggestName, supportsBreak, supportsContinueBreak, toStringprivate java.util.LinkedList<Op04StructuredStatement> containedStatements
private boolean indenting
private BlockIdentifier blockIdentifier
public Block(Op04StructuredStatement statement)
public Block(java.util.LinkedList<Op04StructuredStatement> containedStatements, boolean indenting)
public Block(java.util.LinkedList<Op04StructuredStatement> containedStatements, boolean indenting, BlockIdentifier blockIdentifier)
public BytecodeLoc getCombinedLoc()
public void flattenOthersIn()
public void addStatement(Op04StructuredStatement stm)
static Block getEmptyBlock(boolean indenting)
public static Block getBlockFor(boolean indenting, StructuredStatement... statements)
public void collectTypeUsages(TypeUsageCollector collector)
public boolean removeLastContinue(BlockIdentifier block)
public void removeLastNVReturn()
public void removeLastGoto()
public Op04StructuredStatement getLast()
public UnstructuredWhile removeLastEndWhile()
public Pair<java.lang.Boolean,Op04StructuredStatement> getOneStatementIfPresent()
public java.util.List<Op04StructuredStatement> getFilteredBlockStatements()
public Optional<Op04StructuredStatement> getMaybeJustOneStatement()
public boolean inlineable()
inlineable in interface StructuredStatementinlineable in class AbstractStructuredStatementpublic Op04StructuredStatement getInline()
getInline in interface StructuredStatementgetInline in class AbstractStructuredStatementpublic void combineInlineable()
private void replaceInlineSource(Op04StructuredStatement oldS, Op04StructuredStatement newS)
public void extractLabelledBlocks()
public void combineTryCatch()
public boolean isScopeBlock()
isScopeBlock in interface StructuredStatementisScopeBlock in class AbstractStructuredStatementpublic void transformStructuredChildren(StructuredStatementTransformer transformer, StructuredScope scope)
public void transformStructuredChildrenInReverse(StructuredStatementTransformer transformer, StructuredScope scope)
transformStructuredChildrenInReverse in interface StructuredStatementtransformStructuredChildrenInReverse in class AbstractStructuredStatementpublic java.util.Set<Op04StructuredStatement> getNextAfter(int x)
public boolean statementIsLast(Op04StructuredStatement needle)
public BlockIdentifier getBreakableBlockOrNull()
getBreakableBlockOrNull in interface StructuredStatementgetBreakableBlockOrNull in class AbstractStructuredStatementpublic boolean isRecursivelyStructured()
isRecursivelyStructured in interface StructuredStatementisRecursivelyStructured in class AbstractStructuredStatementpublic java.util.List<Op04StructuredStatement> getBlockStatements()
public void replaceBlockStatements(java.util.Collection<Op04StructuredStatement> statements)
public void linearizeInto(java.util.List<StructuredStatement> out)
public void traceLocalVariableScope(LValueScopeDiscoverer scopeDiscoverer)
public void markCreator(LValue scopedEntity, StatementContainer<StructuredStatement> hint)
markCreator in interface StructuredStatementmarkCreator in class AbstractStructuredStatementpublic boolean alwaysDefines(LValue scopedEntity)
alwaysDefines in interface StructuredStatementalwaysDefines in class AbstractStructuredStatementprivate boolean canFoldUp()
public boolean isIndenting()
public void setIndenting(boolean indenting)
public boolean match(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector)
match in interface Matcher<StructuredStatement>match in class AbstractStructuredStatementpublic void rewriteExpressions(ExpressionRewriter expressionRewriter)
public boolean isEffectivelyNOP()
isEffectivelyNOP in interface StructuredStatementisEffectivelyNOP in class AbstractStructuredStatement