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) ConditionalExpressionconditionalExpression(package private) Op04StructuredStatementelseBlock(package private) Op04StructuredStatementifTaken
-
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:
collectTypeUsagesin interfaceTypeUsageCollectable
-
getCombinedLoc
public BytecodeLoc getCombinedLoc()
- Specified by:
getCombinedLocin interfaceHasByteCodeLoc
-
hasElseBlock
public boolean hasElseBlock()
-
getConditionalExpression
public ConditionalExpression getConditionalExpression()
-
getIfTaken
public Op04StructuredStatement getIfTaken()
-
informBlockHeirachy
public StructuredStatement informBlockHeirachy(java.util.Vector<BlockIdentifier> blockIdentifiers)
- Specified by:
informBlockHeirachyin interfaceStructuredStatement- Overrides:
informBlockHeirachyin classAbstractStructuredStatement
-
isScopeBlock
public boolean isScopeBlock()
- Specified by:
isScopeBlockin interfaceStructuredStatement- Overrides:
isScopeBlockin classAbstractStructuredStatement
-
transformStructuredChildren
public void transformStructuredChildren(StructuredStatementTransformer transformer, StructuredScope scope)
- Specified by:
transformStructuredChildrenin interfaceStructuredStatement
-
linearizeInto
public void linearizeInto(java.util.List<StructuredStatement> out)
- Specified by:
linearizeIntoin interfaceStructuredStatement
-
traceLocalVariableScope
public void traceLocalVariableScope(LValueScopeDiscoverer scopeDiscoverer)
- Specified by:
traceLocalVariableScopein interfaceStructuredStatement
-
canDefine
public boolean canDefine(LValue scopedEntity, ScopeDiscoverInfoCache factCache)
- Specified by:
canDefinein interfaceStructuredStatement- Overrides:
canDefinein classAbstractStructuredStatement
-
markCreator
public void markCreator(LValue scopedEntity, StatementContainer<StructuredStatement> hint)
- Specified by:
markCreatorin interfaceStructuredStatement- Overrides:
markCreatorin classAbstractStructuredStatement
-
isRecursivelyStructured
public boolean isRecursivelyStructured()
- Specified by:
isRecursivelyStructuredin interfaceStructuredStatement- Overrides:
isRecursivelyStructuredin classAbstractStructuredStatement
-
fallsNopToNext
public boolean fallsNopToNext()
- Specified by:
fallsNopToNextin interfaceStructuredStatement- Overrides:
fallsNopToNextin classAbstractStructuredStatement
-
match
public boolean match(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector)
- Specified by:
matchin interfaceMatcher<StructuredStatement>- Overrides:
matchin classAbstractStructuredStatement
-
rewriteExpressions
public void rewriteExpressions(ExpressionRewriter expressionRewriter)
- Specified by:
rewriteExpressionsin interfaceStructuredStatement
-
convertToAssertion
public StructuredStatement convertToAssertion(StructuredAssert structuredAssert)
-
removePointlessBlocks
public void removePointlessBlocks(StructuredScope scope)
- Specified by:
removePointlessBlocksin interfaceCanRemovePointlessBlock
-
-