public class Callgraph extends Object
| Constructor and Description |
|---|
Callgraph(com.ibm.wala.util.graph.Graph<com.sap.psr.vulas.shared.json.model.ConstructId> _g)
Creates a callgraph and populates an internal map of constructs and integer indices (which allow faster processing and more compact representations).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
existsInCallgraph(com.sap.psr.vulas.shared.json.model.ConstructId _c)
Returns true if the given construct exists in this callgraph, false otherwise.
|
com.sap.psr.vulas.shared.json.model.ConstructId |
getConstructForId(int _id)
getConstructForId.
|
Set<com.sap.psr.vulas.shared.json.model.ConstructId> |
getConstructsWithoutJarUrl()
Getter for the field
constructsWithoutJarUrl. |
Map<com.sap.psr.vulas.shared.json.model.ConstructId,Integer> |
getDist(com.sap.psr.vulas.shared.json.model.ConstructId _tgt)
Given a target (changes), compute the shortest distance from all nodes to this target
|
int |
getEdgeCount()
Returns the number of edges in this graph.
|
com.ibm.wala.util.graph.Graph<Integer> |
getGraph()
getGraph.
|
int |
getIdForConstruct(com.sap.psr.vulas.shared.json.model.ConstructId _c)
Returns the unique integer ID of the given construct in the context of this callgraph, or -1 if no such identifier exists.
|
NodeMetaInformation |
getInformationForConstructId(com.sap.psr.vulas.shared.json.model.ConstructId target)
getInformationForConstructId.
|
NodeMetaInformation |
getInformationForId(Integer id)
getInformationForId.
|
int |
getNodeCount()
Returns the number of nodes in this graph.
|
ArrayList<com.sap.psr.vulas.shared.json.model.ConstructId> |
getNodeId()
Getter for the field
nodeId. |
Map<com.sap.psr.vulas.shared.json.model.ConstructId,LinkedList<Integer>> |
getShortestPath(com.sap.psr.vulas.shared.json.model.ConstructId _tgt,
Set<com.sap.psr.vulas.shared.json.model.ConstructId> _stop_if_path_found)
Given a target construct (e.g., a change list element of a security patch), the method computes the shortest
path from all callgraph nodes to this target (if any).
|
public Callgraph(com.ibm.wala.util.graph.Graph<com.sap.psr.vulas.shared.json.model.ConstructId> _g)
_g - a Graph object.public com.ibm.wala.util.graph.Graph<Integer> getGraph()
getGraph.
Graph object.public int getIdForConstruct(com.sap.psr.vulas.shared.json.model.ConstructId _c)
_c - a ConstructId object.public boolean existsInCallgraph(com.sap.psr.vulas.shared.json.model.ConstructId _c)
_c - a ConstructId object.public ArrayList<com.sap.psr.vulas.shared.json.model.ConstructId> getNodeId()
Getter for the field nodeId.
ArrayList object.public com.sap.psr.vulas.shared.json.model.ConstructId getConstructForId(int _id)
getConstructForId.
_id - a int.ConstructId object.public NodeMetaInformation getInformationForConstructId(com.sap.psr.vulas.shared.json.model.ConstructId target)
getInformationForConstructId.
target - a ConstructId object.NodeMetaInformation object.public Set<com.sap.psr.vulas.shared.json.model.ConstructId> getConstructsWithoutJarUrl()
Getter for the field constructsWithoutJarUrl.
Set object.public NodeMetaInformation getInformationForId(Integer id)
getInformationForId.
id - a Integer object.NodeMetaInformation object.public int getNodeCount()
getEdgeCount()public int getEdgeCount()
getNodeCount()public Map<com.sap.psr.vulas.shared.json.model.ConstructId,Integer> getDist(com.sap.psr.vulas.shared.json.model.ConstructId _tgt)
_tgt - a ConstructId object.Map object.public Map<com.sap.psr.vulas.shared.json.model.ConstructId,LinkedList<Integer>> getShortestPath(com.sap.psr.vulas.shared.json.model.ConstructId _tgt, Set<com.sap.psr.vulas.shared.json.model.ConstructId> _stop_if_path_found)
_tgt - a ConstructId object._stop_if_path_found - a Set object.computeShortestPath(Integer, Map, Set)Copyright © 2018–2020. All rights reserved.