File tree Expand file tree Collapse file tree
schema/src/main/scala/io/shiftleft/codepropertygraph/schema Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,8 +176,22 @@ object CallGraph extends SchemaBase {
176176 ).protoId(ProtoIds .Inlined )
177177 )
178178
179+ val staticBaseType = builder
180+ .addProperty(
181+ name = " STATIC_BASE_TYPE" ,
182+ valueType = ValueType .String ,
183+ comment = """ The `STATIC_BASE_TYPE` field is used to keep track of the type on which a static method
184+ |is called for static methods which may be inherited. This information can then be used to find
185+ |the true `METHOD_FULL_NAME` of the method being called during call linking. For example, if a
186+ |class `Foo` defines a static method `foo` and a class `Bar extends Foo`, then the `STATIC_BASE_TYPE`
187+ |of a`Bar.foo()` call is `Bar` and the `METHOD_FULL_NAME` of the `foo` call is rewritten to
188+ |`Foo.foo:<signature>`.
189+ |""" .stripMargin
190+ )
191+ .protoId(ProtoIds .StaticBaseType )
192+
179193 callNode
180- .addProperties(dispatchType)
194+ .addProperties(dispatchType, staticBaseType )
181195
182196 callNode
183197 .addOutEdge(edge = call, inNode = method)
Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ object ProtoIds {
124124 val AstParentType = 56
125125 val AstParentFullName = 57
126126 val DependencyGroupId = 58
127+ val StaticBaseType = 59
127128 val Symbol = 100
128129 val MethodShortName = 102
129130 val PackageName = 103
You can’t perform that action at this time.
0 commit comments