Class StructuredIf
- java.lang.Object
-
- org.benf.cfr.reader.bytecode.analysis.structured.statement.AbstractStructuredStatement
-
- org.benf.cfr.reader.bytecode.analysis.structured.statement.StructuredIf
-
- All Implemented Interfaces:
HasByteCodeLoc
,Matcher<StructuredStatement>
,CanRemovePointlessBlock
,StructuredStatement
,Dumpable
,TypeUsageCollectable
public class StructuredIf extends AbstractStructuredStatement implements CanRemovePointlessBlock
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ConditionalExpression
conditionalExpression
(package private) Op04StructuredStatement
elseBlock
(package private) Op04StructuredStatement
ifTaken
-
Constructor Summary
Constructors Constructor Description StructuredIf(BytecodeLoc loc, ConditionalExpression conditionalExpression, Op04StructuredStatement ifTaken)
StructuredIf(BytecodeLoc loc, ConditionalExpression conditionalExpression, Op04StructuredStatement ifTaken, Op04StructuredStatement elseBlock)
-
Method Summary
-
Methods inherited from class org.benf.cfr.reader.bytecode.analysis.structured.statement.AbstractStructuredStatement
addLoc, alwaysDefines, canFall, claimBlock, findCreatedHere, getBreakableBlockOrNull, getContainer, getInline, getLoc, inlineable, isEffectivelyNOP, isProperlyStructured, setContainer, suggestName, supportsBreak, supportsContinueBreak, toString, transformStructuredChildrenInReverse
-
-
-
-
Field Detail
-
conditionalExpression
ConditionalExpression conditionalExpression
-
ifTaken
Op04StructuredStatement ifTaken
-
elseBlock
Op04StructuredStatement elseBlock
-
-
Constructor Detail
-
StructuredIf
public StructuredIf(BytecodeLoc loc, ConditionalExpression conditionalExpression, Op04StructuredStatement ifTaken)
-
StructuredIf
public StructuredIf(BytecodeLoc loc, ConditionalExpression conditionalExpression, Op04StructuredStatement ifTaken, Op04StructuredStatement elseBlock)
-
-
Method Detail
-
collectTypeUsages
public void collectTypeUsages(TypeUsageCollector collector)
- Specified by:
collectTypeUsages
in interfaceTypeUsageCollectable
-
getCombinedLoc
public BytecodeLoc getCombinedLoc()
- Specified by:
getCombinedLoc
in interfaceHasByteCodeLoc
-
hasElseBlock
public boolean hasElseBlock()
-
getConditionalExpression
public ConditionalExpression getConditionalExpression()
-
getIfTaken
public Op04StructuredStatement getIfTaken()
-
informBlockHeirachy
public StructuredStatement informBlockHeirachy(java.util.Vector<BlockIdentifier> blockIdentifiers)
- Specified by:
informBlockHeirachy
in interfaceStructuredStatement
- Overrides:
informBlockHeirachy
in classAbstractStructuredStatement
-
isScopeBlock
public boolean isScopeBlock()
- Specified by:
isScopeBlock
in interfaceStructuredStatement
- Overrides:
isScopeBlock
in classAbstractStructuredStatement
-
transformStructuredChildren
public void transformStructuredChildren(StructuredStatementTransformer transformer, StructuredScope scope)
- Specified by:
transformStructuredChildren
in interfaceStructuredStatement
-
linearizeInto
public void linearizeInto(java.util.List<StructuredStatement> out)
- Specified by:
linearizeInto
in interfaceStructuredStatement
-
traceLocalVariableScope
public void traceLocalVariableScope(LValueScopeDiscoverer scopeDiscoverer)
- Specified by:
traceLocalVariableScope
in interfaceStructuredStatement
-
canDefine
public boolean canDefine(LValue scopedEntity, ScopeDiscoverInfoCache factCache)
- Specified by:
canDefine
in interfaceStructuredStatement
- Overrides:
canDefine
in classAbstractStructuredStatement
-
markCreator
public void markCreator(LValue scopedEntity, StatementContainer<StructuredStatement> hint)
- Specified by:
markCreator
in interfaceStructuredStatement
- Overrides:
markCreator
in classAbstractStructuredStatement
-
isRecursivelyStructured
public boolean isRecursivelyStructured()
- Specified by:
isRecursivelyStructured
in interfaceStructuredStatement
- Overrides:
isRecursivelyStructured
in classAbstractStructuredStatement
-
fallsNopToNext
public boolean fallsNopToNext()
- Specified by:
fallsNopToNext
in interfaceStructuredStatement
- Overrides:
fallsNopToNext
in classAbstractStructuredStatement
-
match
public boolean match(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector)
- Specified by:
match
in interfaceMatcher<StructuredStatement>
- Overrides:
match
in classAbstractStructuredStatement
-
rewriteExpressions
public void rewriteExpressions(ExpressionRewriter expressionRewriter)
- Specified by:
rewriteExpressions
in interfaceStructuredStatement
-
convertToAssertion
public StructuredStatement convertToAssertion(StructuredAssert structuredAssert)
-
removePointlessBlocks
public void removePointlessBlocks(StructuredScope scope)
- Specified by:
removePointlessBlocks
in interfaceCanRemovePointlessBlock
-
-