Class AbstractStatement
- java.lang.Object
-
- org.benf.cfr.reader.bytecode.analysis.parse.statement.AbstractStatement
-
- All Implemented Interfaces:
HasByteCodeLoc
,DeepCloneable<Statement>
,Statement
,ComparableUnderEC
,Dumpable
- Direct Known Subclasses:
AbstractAssignment
,AnonBreakTarget
,CaseStatement
,CatchStatement
,CommentStatement
,CompoundStatement
,ConstructorStatement
,DoStatement
,ExpressionStatement
,FinallyStatement
,ForIterStatement
,ForStatement
,IfExitingStatement
,JSRCallStatement
,JSRRetStatement
,JumpingStatement
,MonitorStatement
,Nop
,RawSwitchStatement
,ReturnStatement
,SwitchStatement
,TryStatement
,WhileStatement
public abstract class AbstractStatement extends java.lang.Object implements Statement
-
-
Field Summary
Fields Modifier and Type Field Description private StatementContainer<Statement>
container
private BytecodeLoc
loc
-
Constructor Summary
Constructors Constructor Description AbstractStatement(BytecodeLoc loc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLoc(HasByteCodeLoc loc)
boolean
canThrow(ExceptionCheck caught)
SSAIdentifiers<LValue>
collectLocallyMutatedVariables(SSAIdentifierFactory<LValue,?> ssaIdentifierFactory)
void
collectLValueAssignments(LValueAssignmentCollector<Statement> lValueAssigmentCollector)
void
collectObjectCreation(CreationCollector creationCollector)
boolean
doesBlackListLValueReplacement(LValue lValue, Expression expression)
boolean
fallsToNext()
java.util.List<Statement>
getCompoundParts()
StatementContainer<Statement>
getContainer()
LValue
getCreatedLValue()
BytecodeLoc
getLoc()
Expression
getRValue()
protected Statement
getTargetStatement(int idx)
boolean
isCompound()
Statement
outerDeepClone(CloneHelper cloneHelper)
void
setContainer(StatementContainer<Statement> container)
void
setLifetimeHint(LValue lv, boolean usedInChildren)
java.lang.String
toString()
java.util.Set<LValue>
wantsLifetimeHint()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.benf.cfr.reader.bytecode.analysis.parse.rewriters.DeepCloneable
deepClone
-
Methods inherited from interface org.benf.cfr.reader.bytecode.analysis.loc.HasByteCodeLoc
getCombinedLoc
-
Methods inherited from interface org.benf.cfr.reader.bytecode.analysis.parse.Statement
collectLValueUsage, equivalentUnder, getStructuredStatement, replaceSingleUsageLValues, rewriteExpressions
-
-
-
-
Field Detail
-
loc
private BytecodeLoc loc
-
container
private StatementContainer<Statement> container
-
-
Constructor Detail
-
AbstractStatement
public AbstractStatement(BytecodeLoc loc)
-
-
Method Detail
-
getLoc
public BytecodeLoc getLoc()
- Specified by:
getLoc
in interfaceHasByteCodeLoc
-
addLoc
public void addLoc(HasByteCodeLoc loc)
- Specified by:
addLoc
in interfaceHasByteCodeLoc
-
setContainer
public void setContainer(StatementContainer<Statement> container)
- Specified by:
setContainer
in interfaceStatement
-
outerDeepClone
public Statement outerDeepClone(CloneHelper cloneHelper)
- Specified by:
outerDeepClone
in interfaceDeepCloneable<Statement>
-
getCreatedLValue
public LValue getCreatedLValue()
- Specified by:
getCreatedLValue
in interfaceStatement
-
collectLValueAssignments
public void collectLValueAssignments(LValueAssignmentCollector<Statement> lValueAssigmentCollector)
- Specified by:
collectLValueAssignments
in interfaceStatement
-
doesBlackListLValueReplacement
public boolean doesBlackListLValueReplacement(LValue lValue, Expression expression)
- Specified by:
doesBlackListLValueReplacement
in interfaceStatement
-
collectObjectCreation
public void collectObjectCreation(CreationCollector creationCollector)
- Specified by:
collectObjectCreation
in interfaceStatement
-
collectLocallyMutatedVariables
public SSAIdentifiers<LValue> collectLocallyMutatedVariables(SSAIdentifierFactory<LValue,?> ssaIdentifierFactory)
- Specified by:
collectLocallyMutatedVariables
in interfaceStatement
-
getContainer
public StatementContainer<Statement> getContainer()
- Specified by:
getContainer
in interfaceStatement
-
getRValue
public Expression getRValue()
-
getTargetStatement
protected Statement getTargetStatement(int idx)
-
isCompound
public boolean isCompound()
- Specified by:
isCompound
in interfaceStatement
-
getCompoundParts
public java.util.List<Statement> getCompoundParts()
- Specified by:
getCompoundParts
in interfaceStatement
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
fallsToNext
public boolean fallsToNext()
- Specified by:
fallsToNext
in interfaceStatement
-
canThrow
public boolean canThrow(ExceptionCheck caught)
-
wantsLifetimeHint
public java.util.Set<LValue> wantsLifetimeHint()
- Specified by:
wantsLifetimeHint
in interfaceStatement
-
setLifetimeHint
public void setLifetimeHint(LValue lv, boolean usedInChildren)
- Specified by:
setLifetimeHint
in interfaceStatement
-
-