Java: merge the @class and @interface database types and tables

This will allow the extractor to emit class(id, ...) when all it knows about a class is its name, due to not having it available on the classpath. Previously it would have had to guess whether it belonged to @class or @interface, possibly introducing an inconsistency.
This commit is contained in:
Chris Smowton
2023-02-06 21:08:27 +00:00
parent 029e1d47fe
commit 3514dd1e4d
17 changed files with 31939 additions and 78 deletions

View File

@@ -0,0 +1,11 @@
class ClassOrInterface extends @classorinterface {
string toString() { result = "class-or-interface" }
}
class Package extends @package {
string toString() { result = "package" }
}
from ClassOrInterface id, string nodeName, Package parentId, ClassOrInterface sourceId
where classes_or_interfaces(id, nodeName, parentId, sourceId) and not isInterface(id)
select id, nodeName, parentId, sourceId

View File

@@ -0,0 +1,11 @@
class ClassOrInterface extends @classorinterface {
string toString() { result = "class-or-interface" }
}
class Package extends @package {
string toString() { result = "package" }
}
from ClassOrInterface id, string nodeName, Package parentId, ClassOrInterface sourceId
where classes_or_interfaces(id, nodeName, parentId, sourceId) and isInterface(id)
select id, nodeName, parentId, sourceId

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,5 @@
description: Seperate class and interface tables
compatibility: full
classes.rel: run classes.qlo
interfaces.rel: run interfaces.qlo
isInterface.rel: delete