Skip to content

Commit 182a595

Browse files
committed
Add experimental GENERIC_SIGNATURE.
See comment section in diff for further details.
1 parent d4a6533 commit 182a595

File tree

1 file changed

+18
-0
lines changed
  • schema/src/main/scala/io/shiftleft/codepropertygraph/schema

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package io.shiftleft.codepropertygraph.schema
22

33
import flatgraph.schema.Property.ValueType
44
import flatgraph.schema.{EdgeType, NodeType, SchemaBuilder, SchemaInfo}
5+
import io.shiftleft.codepropertygraph.schema.CpgSchema.PropertyDefaults
56

67
object Hidden extends SchemaBase {
78
override def docIndex: Int = -1
@@ -287,6 +288,23 @@ object Hidden extends SchemaBase {
287288
|we can use this to preserve the link to the original""".stripMargin
288289
)
289290

291+
val genericSignature = builder
292+
.addProperty(
293+
name = "GENERIC_SIGNATURE",
294+
valueType = ValueType.String,
295+
comment = """This field is experimental. It will likely be removed in the future without any notice.
296+
|It stores type information for generic types and methods as well as type information
297+
|for members and locals where the type either contains a type parameter reference or
298+
|an instantiated type reference.
299+
|""".stripMargin
300+
)
301+
.mandatory(PropertyDefaults.String)
302+
.protoId(251)
303+
304+
method.addProperty(genericSignature)
305+
typeDecl.addProperty(genericSignature)
306+
member.addProperty(genericSignature)
307+
local.addProperty(genericSignature)
290308
}
291309

292310
}

0 commit comments

Comments
 (0)