File tree Expand file tree Collapse file tree
soot-infoflow/src/soot/jimple/infoflow/results Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package soot .jimple .infoflow .results ;
22
3+ import soot .jimple .infoflow .sourcesSinks .definitions .ISourceSinkCategory ;
4+ import soot .jimple .infoflow .sourcesSinks .definitions .ISourceSinkDefinition ;
5+
36/**
47 * Data class for having the source and sink of a single flow together in one
58 * place
@@ -25,6 +28,38 @@ public ResultSinkInfo getSink() {
2528 return sink ;
2629 }
2730
31+ /**
32+ * Convenience function to get the source category ID
33+ *
34+ * @return The source category ID or <code>null</code> if no source data is
35+ * available
36+ */
37+ public String getSourceCategoryID () {
38+ ISourceSinkDefinition sourceDef = source .getDefinition ();
39+ if (sourceDef != null ) {
40+ ISourceSinkCategory sourceCat = sourceDef .getCategory ();
41+ if (sourceCat != null )
42+ return sourceCat .getID ();
43+ }
44+ return null ;
45+ }
46+
47+ /**
48+ * Convenience function to get the sink category ID
49+ *
50+ * @return The sink category ID or <code>null</code> if no sink data is
51+ * available
52+ */
53+ public String getSinkCategoryID () {
54+ ISourceSinkDefinition sinkDef = sink .getDefinition ();
55+ if (sinkDef != null ) {
56+ ISourceSinkCategory sinkCat = sinkDef .getCategory ();
57+ if (sinkCat != null )
58+ return sinkCat .getID ();
59+ }
60+ return null ;
61+ }
62+
2863 @ Override
2964 public String toString () {
3065 StringBuilder sb = new StringBuilder ();
You can’t perform that action at this time.
0 commit comments