Class Statement
- java.lang.Object
-
- org.jetbrains.java.decompiler.modules.decompiler.stats.Statement
-
- All Implemented Interfaces:
IMatchable
- Direct Known Subclasses:
BasicBlockStatement,CatchAllStatement,CatchStatement,DoStatement,DummyExitStatement,GeneralStatement,IfStatement,RootStatement,SequenceStatement,SwitchStatement,SynchronizedStatement
public abstract class Statement extends java.lang.Object implements IMatchable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStatement.EdgeDirectionstatic classStatement.LastBasicTypestatic classStatement.StatementType-
Nested classes/interfaces inherited from interface org.jetbrains.java.decompiler.struct.match.IMatchable
IMatchable.MatchProperties
-
-
Field Summary
Fields Modifier and Type Field Description protected booleancontainsMonitorExitprotected java.util.HashSet<Statement>continueSetprotected java.util.List<Exprent>exprentsprotected Statementfirstintidprotected booleanisLastAthrowprotected booleanisMonitorEnterprotected java.util.HashSet<StatEdge>labelEdgesprotected Statement.LastBasicTypelastBasicTypeprotected Statementparentprotected Statementpoststatic intSTATEDGE_ALLstatic intSTATEDGE_DIRECT_ALLprotected VBStyleCollection<Statement,java.lang.Integer>statsStatement.StatementTypetypeprotected java.util.List<Exprent>varDefinitions
-
Constructor Summary
Constructors Modifier Constructor Description protectedStatement(Statement.StatementType type)protectedStatement(Statement.StatementType type, int id)
-
Method Summary
-
-
-
Field Detail
-
STATEDGE_ALL
public static final int STATEDGE_ALL
- See Also:
- Constant Field Values
-
STATEDGE_DIRECT_ALL
public static final int STATEDGE_DIRECT_ALL
- See Also:
- Constant Field Values
-
type
public final Statement.StatementType type
-
id
public final int id
-
stats
protected final VBStyleCollection<Statement,java.lang.Integer> stats
-
parent
protected Statement parent
-
first
protected Statement first
-
exprents
protected java.util.List<Exprent> exprents
-
labelEdges
protected final java.util.HashSet<StatEdge> labelEdges
-
varDefinitions
protected final java.util.List<Exprent> varDefinitions
-
post
protected Statement post
-
lastBasicType
protected Statement.LastBasicType lastBasicType
-
isMonitorEnter
protected boolean isMonitorEnter
-
isLastAthrow
protected boolean isLastAthrow
-
containsMonitorExit
protected boolean containsMonitorExit
-
continueSet
protected java.util.HashSet<Statement> continueSet
-
-
Constructor Detail
-
Statement
protected Statement(Statement.StatementType type, int id)
-
Statement
protected Statement(Statement.StatementType type)
-
-
Method Detail
-
clearTempInformation
public void clearTempInformation()
-
collapseNodesToStatement
public void collapseNodesToStatement(Statement stat)
-
setAllParent
public void setAllParent()
-
addLabeledEdge
public void addLabeledEdge(StatEdge edge)
-
addEdgeInternal
@Deprecated public void addEdgeInternal(Statement.EdgeDirection direction, StatEdge edge)
Deprecated.
-
removeEdgeInternal
@Deprecated public void removeEdgeInternal(Statement.EdgeDirection direction, StatEdge edge)
Deprecated.
-
addPredecessor
public void addPredecessor(StatEdge edge)
-
removePredecessor
public void removePredecessor(StatEdge edge)
-
addSuccessor
public void addSuccessor(StatEdge edge)
-
removeSuccessor
public void removeSuccessor(StatEdge edge)
-
removeAllSuccessors
public void removeAllSuccessors(Statement stat)
-
buildContinueSet
public java.util.HashSet<Statement> buildContinueSet()
-
buildMonitorFlags
public void buildMonitorFlags()
-
markMonitorexitDead
public void markMonitorexitDead()
-
getReversePostOrderList
public java.util.List<Statement> getReversePostOrderList()
-
getPostReversePostOrderList
public java.util.List<Statement> getPostReversePostOrderList()
-
getPostReversePostOrderList
public java.util.List<Statement> getPostReversePostOrderList(java.util.List<Statement> lstexits)
-
containsStatement
public boolean containsStatement(Statement stat)
-
containsStatementStrict
public boolean containsStatementStrict(Statement stat)
-
containsStatementById
public boolean containsStatementById(int statId)
-
containsStatementStrictById
public boolean containsStatementStrictById(int statId)
-
toJava
public TextBuffer toJava()
-
toJava
public TextBuffer toJava(int indent)
-
getSequentialObjects
public java.util.List<java.lang.Object> getSequentialObjects()
-
initExprents
public void initExprents()
-
getSimpleCopy
public Statement getSimpleCopy()
-
initSimpleCopy
public void initSimpleCopy()
-
replaceWith
public final void replaceWith(Statement stat)
-
replaceWithEmpty
public final BasicBlockStatement replaceWithEmpty()
-
getImplicitlyDefinedVars
public java.util.List<VarExprent> getImplicitlyDefinedVars()
Gets the implicitly defined variables in this statement.- Returns:
- A list of
VarExprents that are implicitly defined. Can be null or empty if none exist.
-
changeEdgeNode
public void changeEdgeNode(Statement.EdgeDirection direction, StatEdge edge, Statement value)
-
changeEdgeType
public void changeEdgeType(Statement.EdgeDirection direction, StatEdge edge, int newtype)
-
getNeighbours
public java.util.List<Statement> getNeighbours(int type, Statement.EdgeDirection direction)
-
getNeighboursSet
public java.util.Set<Statement> getNeighboursSet(int type, Statement.EdgeDirection direction)
-
getSuccessorEdges
public java.util.List<StatEdge> getSuccessorEdges(int type)
-
getSuccessorEdgeView
public java.util.List<StatEdge> getSuccessorEdgeView(int type)
-
getPredecessorEdges
public java.util.List<StatEdge> getPredecessorEdges(int type)
-
getAllSuccessorEdges
public java.util.List<StatEdge> getAllSuccessorEdges()
-
hasAnySuccessor
public boolean hasAnySuccessor()
-
hasSuccessor
public boolean hasSuccessor(int type)
-
getFirstSuccessor
public StatEdge getFirstSuccessor()
-
getAllPredecessorEdges
public java.util.List<StatEdge> getAllPredecessorEdges()
-
getFirst
public Statement getFirst()
-
setFirst
public void setFirst(Statement first)
-
getPost
public Statement getPost()
-
getStats
public VBStyleCollection<Statement,java.lang.Integer> getStats()
-
getLastBasicType
public Statement.LastBasicType getLastBasicType()
-
getContinueSet
public java.util.HashSet<Statement> getContinueSet()
-
containsMonitorExit
public boolean containsMonitorExit()
-
containsMonitorExitOrAthrow
public boolean containsMonitorExitOrAthrow()
-
isMonitorEnter
public boolean isMonitorEnter()
-
getBasichead
public BasicBlockStatement getBasichead()
-
isLabeled
public boolean isLabeled()
-
hasBasicSuccEdge
public boolean hasBasicSuccEdge()
-
getParent
public Statement getParent()
-
setParent
public void setParent(Statement parent)
-
getTopParent
public RootStatement getTopParent()
-
getLabelEdges
public java.util.HashSet<StatEdge> getLabelEdges()
-
getVarDefinitions
public java.util.List<Exprent> getVarDefinitions()
-
getExprents
public java.util.List<Exprent> getExprents()
-
setExprents
public void setExprents(java.util.List<Exprent> exprents)
-
isCopied
public boolean isCopied()
-
setCopied
public void setCopied(boolean copied)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getOffset
public void getOffset(java.util.BitSet values)
-
getStartEndRange
public StartEndPair getStartEndRange()
-
findObject
public IMatchable findObject(MatchNode matchNode, int index)
- Specified by:
findObjectin interfaceIMatchable
-
match
public boolean match(MatchNode matchNode, MatchEngine engine)
- Specified by:
matchin interfaceIMatchable
-
-