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
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ConditionalExpression(package private) Op04StructuredStatement(package private) Op04StructuredStatement -
Constructor Summary
ConstructorsConstructorDescriptionStructuredIf(BytecodeLoc loc, ConditionalExpression conditionalExpression, Op04StructuredStatement ifTaken) StructuredIf(BytecodeLoc loc, ConditionalExpression conditionalExpression, Op04StructuredStatement ifTaken, Op04StructuredStatement elseBlock) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanDefine(LValue scopedEntity, ScopeDiscoverInfoCache factCache) voidcollectTypeUsages(TypeUsageCollector collector) convertToAssertion(StructuredAssert structuredAssert) booleanbooleaninformBlockHeirachy(Vector<BlockIdentifier> blockIdentifiers) booleanbooleanvoidvoidmarkCreator(LValue scopedEntity, StatementContainer<StructuredStatement> hint) booleanmatch(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector) voidvoidrewriteExpressions(ExpressionRewriter expressionRewriter) voidtraceLocalVariableScope(LValueScopeDiscoverer scopeDiscoverer) voidtransformStructuredChildren(StructuredStatementTransformer transformer, StructuredScope scope) Methods inherited from class AbstractStructuredStatement
addLoc, alwaysDefines, canFall, claimBlock, findCreatedHere, getBreakableBlockOrNull, getContainer, getInline, getLoc, inlineable, isEffectivelyNOP, isProperlyStructured, setContainer, suggestName, supportsBreak, supportsContinueBreak, toString, transformStructuredChildrenInReverse
-
Field Details
-
conditionalExpression
ConditionalExpression conditionalExpression -
ifTaken
Op04StructuredStatement ifTaken -
elseBlock
Op04StructuredStatement elseBlock
-
-
Constructor Details
-
StructuredIf
public StructuredIf(BytecodeLoc loc, ConditionalExpression conditionalExpression, Op04StructuredStatement ifTaken) -
StructuredIf
public StructuredIf(BytecodeLoc loc, ConditionalExpression conditionalExpression, Op04StructuredStatement ifTaken, Op04StructuredStatement elseBlock)
-
-
Method Details
-
collectTypeUsages
- Specified by:
collectTypeUsagesin interfaceTypeUsageCollectable
-
getCombinedLoc
- Specified by:
getCombinedLocin interfaceHasByteCodeLoc
-
dump
-
hasElseBlock
public boolean hasElseBlock() -
getConditionalExpression
-
getIfTaken
-
informBlockHeirachy
- 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
- Specified by:
linearizeIntoin interfaceStructuredStatement
-
traceLocalVariableScope
- Specified by:
traceLocalVariableScopein interfaceStructuredStatement
-
canDefine
- Specified by:
canDefinein interfaceStructuredStatement- Overrides:
canDefinein classAbstractStructuredStatement
-
markCreator
- 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
- Specified by:
rewriteExpressionsin interfaceStructuredStatement
-
convertToAssertion
-
removePointlessBlocks
- Specified by:
removePointlessBlocksin interfaceCanRemovePointlessBlock
-