类 Cfa<CfaNodeT extends CfaNode<CfaEdgeT,SignatureT>,CfaEdgeT extends CfaEdge<CfaNodeT>,SignatureT extends Signature>
- java.lang.Object
-
- proguard.analysis.cpa.defaults.Cfa<CfaNodeT,CfaEdgeT,SignatureT>
-
- 直接已知子类:
JvmCfa
public abstract class Cfa<CfaNodeT extends CfaNode<CfaEdgeT,SignatureT>,CfaEdgeT extends CfaEdge<CfaNodeT>,SignatureT extends Signature> extends java.lang.ObjectACfais a control flow automaton with nodes<CfaNodeT>and edges<CfaEdgeT>. It can be used for different programming languages with functions identified by<SignatureT>.
-
-
字段概要
字段 修饰符和类型 字段 说明 protected java.util.Map<SignatureT,java.util.Map<java.lang.Integer,CfaNodeT>>functionNodes
-
构造器概要
构造器 构造器 说明 Cfa()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddFunctionEntryNode(SignatureT signature, CfaNodeT node)Add an entry node to the graph for a specified function (with offset 0).voidaddFunctionNode(SignatureT signature, CfaNodeT node, int offset)Add a node to the graph for a specified function.java.util.stream.Stream<CfaNodeT>getAllNodes()Returns a stream of all the nodes present in the graph.CfaNodeTgetFunctionEntryNode(SignatureT signature)Returns the entry node of a specific function (with offset 0), returns null if the function or its entry node are not in the graph.java.util.Collection<CfaNodeT>getFunctionEntryNodes()Returns a collection of the entry nodes (with offset 0) of all the functions present in the graph, returns an empty collection if the graph is empty.CfaNodeTgetFunctionNode(Clazz clazz, Method method, int offset)Returns the node of a function at a specific code offset, returns null if the function or the specific node are not in the graph.CfaNodeTgetFunctionNode(SignatureT signature, int offset)Returns the node of a function at a specific code offset, returns null if the function or the specific node are not in the graph.java.util.Collection<CfaNodeT>getFunctionNodes(SignatureT signature)Returns all the nodes of a specific function, returns an empty collection if the function is not in the graph or if it has no nodes.booleanisEmpty()Returns true if there are no nodes in the CFA, false otherwise.
-
-
-
字段详细资料
-
functionNodes
protected final java.util.Map<SignatureT extends Signature,java.util.Map<java.lang.Integer,CfaNodeT extends CfaNode<CfaEdgeT,SignatureT>>> functionNodes
-
-
方法详细资料
-
isEmpty
public boolean isEmpty()
Returns true if there are no nodes in the CFA, false otherwise.
-
getAllNodes
public java.util.stream.Stream<CfaNodeT> getAllNodes()
Returns a stream of all the nodes present in the graph.Note: a
Streamis provided to avoid creating new collections unnecessarily.
-
getFunctionEntryNodes
public java.util.Collection<CfaNodeT> getFunctionEntryNodes()
Returns a collection of the entry nodes (with offset 0) of all the functions present in the graph, returns an empty collection if the graph is empty.
-
getFunctionEntryNode
public CfaNodeT getFunctionEntryNode(SignatureT signature)
Returns the entry node of a specific function (with offset 0), returns null if the function or its entry node are not in the graph.- 参数:
signature- The signature of the function.
-
getFunctionNodes
public java.util.Collection<CfaNodeT> getFunctionNodes(SignatureT signature)
Returns all the nodes of a specific function, returns an empty collection if the function is not in the graph or if it has no nodes.- 参数:
signature- The signature of the function.
-
getFunctionNode
public CfaNodeT getFunctionNode(SignatureT signature, int offset)
Returns the node of a function at a specific code offset, returns null if the function or the specific node are not in the graph.- 参数:
signature- The signature of the function.offset- The offset of the code location represented by the node.
-
getFunctionNode
public CfaNodeT getFunctionNode(Clazz clazz, Method method, int offset)
Returns the node of a function at a specific code offset, returns null if the function or the specific node are not in the graph.
-
addFunctionEntryNode
public void addFunctionEntryNode(SignatureT signature, CfaNodeT node)
Add an entry node to the graph for a specified function (with offset 0).- 参数:
signature- The signature of the function,.node- The entry node to add.
-
addFunctionNode
public void addFunctionNode(SignatureT signature, CfaNodeT node, int offset)
Add a node to the graph for a specified function.- 参数:
signature- The signature of the function.node- The node to add.
-
-