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 TypeMethodDescriptionboolean
canDefine
(LValue scopedEntity, ScopeDiscoverInfoCache factCache) void
collectTypeUsages
(TypeUsageCollector collector) convertToAssertion
(StructuredAssert structuredAssert) boolean
boolean
informBlockHeirachy
(Vector<BlockIdentifier> blockIdentifiers) boolean
boolean
void
void
markCreator
(LValue scopedEntity, StatementContainer<StructuredStatement> hint) boolean
match
(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector) void
void
rewriteExpressions
(ExpressionRewriter expressionRewriter) void
traceLocalVariableScope
(LValueScopeDiscoverer scopeDiscoverer) void
transformStructuredChildren
(StructuredStatementTransformer transformer, StructuredScope scope) 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 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:
collectTypeUsages
in interfaceTypeUsageCollectable
-
getCombinedLoc
- Specified by:
getCombinedLoc
in interfaceHasByteCodeLoc
-
dump
-
hasElseBlock
public boolean hasElseBlock() -
getConditionalExpression
-
getIfTaken
-
informBlockHeirachy
- 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
- Specified by:
linearizeInto
in interfaceStructuredStatement
-
traceLocalVariableScope
- Specified by:
traceLocalVariableScope
in interfaceStructuredStatement
-
canDefine
- Specified by:
canDefine
in interfaceStructuredStatement
- Overrides:
canDefine
in classAbstractStructuredStatement
-
markCreator
- 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
- Specified by:
rewriteExpressions
in interfaceStructuredStatement
-
convertToAssertion
-
removePointlessBlocks
- Specified by:
removePointlessBlocks
in interfaceCanRemovePointlessBlock
-