Skip to content

Commit 5b8ceca

Browse files
Add isModuleImport node property
1 parent 66866d6 commit 5b8ceca

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • schema/src/main/scala/io/shiftleft/codepropertygraph/schema

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,22 @@ object Hidden extends SchemaBase {
245245
|""".stripMargin
246246
)
247247

248+
val isModuleImport = builder
249+
.addProperty(
250+
name = "IS_MODULE_IMPORT",
251+
valueType = ValueType.Boolean,
252+
comment = """Specifies whether this is a module import.
253+
|This is used for languages like Java >= 25 where packages exported by a module
254+
|can be imported via the module name (which does not need to match the package names in
255+
|any way).""".stripMargin
256+
)
257+
248258
importNode.addProperty(importedEntity)
249259
importNode.addProperty(importedAs)
250260
importNode.addProperty(explicitAs)
251261
importNode.addProperty(isWildcard)
252262
importNode.addProperty(isExplicit)
263+
importNode.addProperty(isModuleImport)
253264

254265
val imports = builder
255266
.addEdgeType(name = "IMPORTS", comment = "Edge from imports to dependencies")

0 commit comments

Comments
 (0)