Skip to content

Commit 3514dd1

Browse files
committed
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.
1 parent 029e1d4 commit 3514dd1

File tree

17 files changed

+31939
-78
lines changed

17 files changed

+31939
-78
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class ClassOrInterface extends @classorinterface {
2+
string toString() { result = "class-or-interface" }
3+
}
4+
5+
class Package extends @package {
6+
string toString() { result = "package" }
7+
}
8+
9+
from ClassOrInterface id, string nodeName, Package parentId, ClassOrInterface sourceId
10+
where classes_or_interfaces(id, nodeName, parentId, sourceId) and not isInterface(id)
11+
select id, nodeName, parentId, sourceId
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class ClassOrInterface extends @classorinterface {
2+
string toString() { result = "class-or-interface" }
3+
}
4+
5+
class Package extends @package {
6+
string toString() { result = "package" }
7+
}
8+
9+
from ClassOrInterface id, string nodeName, Package parentId, ClassOrInterface sourceId
10+
where classes_or_interfaces(id, nodeName, parentId, sourceId) and isInterface(id)
11+
select id, nodeName, parentId, sourceId

0 commit comments

Comments
 (0)