Class StructuredReturn
- java.lang.Object
-
- org.benf.cfr.reader.bytecode.analysis.structured.statement.AbstractStructuredStatement
-
- org.benf.cfr.reader.bytecode.analysis.structured.statement.StructuredReturn
-
- All Implemented Interfaces:
HasByteCodeLoc
,Matcher<StructuredStatement>
,BoxingProcessor
,StructuredStatement
,Dumpable
,TypeUsageCollectable
public class StructuredReturn extends AbstractStructuredStatement implements BoxingProcessor
-
-
Field Summary
Fields Modifier and Type Field Description private JavaTypeInstance
fnReturnType
private Expression
value
-
Constructor Summary
Constructors Constructor Description StructuredReturn(BytecodeLoc loc)
StructuredReturn(BytecodeLoc loc, Expression value, JavaTypeInstance fnReturnType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyNonArgExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
boolean
canFall()
void
collectTypeUsages(TypeUsageCollector collector)
Dumper
dump(Dumper dumper)
boolean
equals(java.lang.Object obj)
BytecodeLoc
getCombinedLoc()
Expression
getValue()
void
linearizeInto(java.util.List<StructuredStatement> out)
boolean
match(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector)
boolean
rewriteBoxing(PrimitiveBoxingRewriter boxingRewriter)
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, canDefine, claimBlock, fallsNopToNext, findCreatedHere, getBreakableBlockOrNull, getContainer, getInline, getLoc, informBlockHeirachy, inlineable, isEffectivelyNOP, isProperlyStructured, isRecursivelyStructured, isScopeBlock, markCreator, setContainer, suggestName, supportsBreak, supportsContinueBreak, toString, transformStructuredChildrenInReverse
-
-
-
-
Field Detail
-
value
private Expression value
-
fnReturnType
private final JavaTypeInstance fnReturnType
-
-
Constructor Detail
-
StructuredReturn
public StructuredReturn(BytecodeLoc loc)
-
StructuredReturn
public StructuredReturn(BytecodeLoc loc, Expression value, JavaTypeInstance fnReturnType)
-
-
Method Detail
-
getCombinedLoc
public BytecodeLoc getCombinedLoc()
- Specified by:
getCombinedLoc
in interfaceHasByteCodeLoc
-
collectTypeUsages
public void collectTypeUsages(TypeUsageCollector collector)
- Specified by:
collectTypeUsages
in interfaceTypeUsageCollectable
-
getValue
public Expression getValue()
-
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
-
rewriteBoxing
public boolean rewriteBoxing(PrimitiveBoxingRewriter boxingRewriter)
- Specified by:
rewriteBoxing
in interfaceBoxingProcessor
-
applyNonArgExpressionRewriter
public void applyNonArgExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
- Specified by:
applyNonArgExpressionRewriter
in interfaceBoxingProcessor
-
rewriteExpressions
public void rewriteExpressions(ExpressionRewriter expressionRewriter)
- Specified by:
rewriteExpressions
in interfaceStructuredStatement
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
canFall
public boolean canFall()
- Specified by:
canFall
in interfaceStructuredStatement
- Overrides:
canFall
in classAbstractStructuredStatement
-
match
public boolean match(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector)
- Specified by:
match
in interfaceMatcher<StructuredStatement>
- Overrides:
match
in classAbstractStructuredStatement
-
-