Skip to content

Commit 0e3048f

Browse files
committed
call: staticCall In|Out accessor names
1 parent 05a7a7c commit 0e3048f

File tree

3 files changed

+23
-3
lines changed
  • domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors
  • schema/src/main/scala/io/shiftleft/codepropertygraph/schema

3 files changed

+23
-3
lines changed

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Call.scala

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,12 @@ final class AccessNeighborsForCall(val node: nodes.Call) extends AnyVal {
330330

331331
/** Traverse to METHOD via CALL OUT edge.
332332
*/
333-
def _methodViaCallOut: Iterator[nodes.Method] = callOut.collectAll[nodes.Method]
333+
@deprecated("please use staticCallOut instead")
334+
def _methodViaCallOut: Iterator[nodes.Method] = staticCallOut
335+
336+
/** Traverse to METHOD via CALL OUT edge.
337+
*/
338+
def staticCallOut: Iterator[nodes.Method] = callOut.collectAll[nodes.Method]
334339

335340
/** Traverse to METHOD via CONTAINS IN edge.
336341
*/
@@ -932,6 +937,11 @@ final class AccessNeighborsForCallTraversal(val traversal: Iterator[nodes.Call])
932937

933938
/** Traverse to METHOD via CALL OUT edge.
934939
*/
940+
def staticCallOut: Iterator[nodes.Method] = traversal.flatMap(_.staticCallOut)
941+
942+
/** Traverse to METHOD via CALL OUT edge.
943+
*/
944+
@deprecated("please use staticCallOut instead")
935945
def _methodViaCallOut: Iterator[nodes.Method] = traversal.flatMap(_._methodViaCallOut)
936946

937947
/** Traverse to METHOD via CONTAINS IN edge.

domainClasses/src/main/generated/io/shiftleft/codepropertygraph/generated/neighboraccessors/Method.scala

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ final class AccessNeighborsForMethod(val node: nodes.Method) extends AnyVal {
2727

2828
/** Traverse to CALL via CALL IN edge.
2929
*/
30-
def _callViaCallIn: Iterator[nodes.Call] = callIn.collectAll[nodes.Call]
30+
@deprecated("please use staticCallIn instead")
31+
def _callViaCallIn: Iterator[nodes.Call] = staticCallIn
32+
33+
/** Traverse to CALL via CALL IN edge.
34+
*/
35+
def staticCallIn: Iterator[nodes.Call] = callIn.collectAll[nodes.Call]
3136

3237
/** Traverse to CALL via CONTAINS OUT edge.
3338
*/
@@ -351,6 +356,11 @@ final class AccessNeighborsForMethodTraversal(val traversal: Iterator[nodes.Meth
351356

352357
/** Traverse to CALL via CALL IN edge.
353358
*/
359+
def staticCallIn: Iterator[nodes.Call] = traversal.flatMap(_.staticCallIn)
360+
361+
/** Traverse to CALL via CALL IN edge.
362+
*/
363+
@deprecated("please use staticCallIn instead")
354364
def _callViaCallIn: Iterator[nodes.Call] = traversal.flatMap(_._callViaCallIn)
355365

356366
/** Traverse to CALL via CONTAINS OUT edge.

schema/src/main/scala/io/shiftleft/codepropertygraph/schema/CallGraph.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ object CallGraph extends SchemaBase {
194194
.addProperties(dispatchType, staticReceiver)
195195

196196
callNode
197-
.addOutEdge(edge = call, inNode = method)
197+
.addOutEdge(edge = call, inNode = method, stepNameIn = "staticCallIn", stepNameOut = "staticCallOut")
198198

199199
callNode
200200
.addProperty(methodFullName)

0 commit comments

Comments
 (0)