mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Overlay: Add discarding for Java classes, interfaces & fields
This commit is contained in:
@@ -848,6 +848,9 @@ class Field extends Member, ExprParent, @field, Variable {
|
||||
override string getAPrimaryQlClass() { result = "Field" }
|
||||
}
|
||||
|
||||
overlay[local]
|
||||
private class DiscardableField extends DiscardableReferableLocatable, @field { }
|
||||
|
||||
/** An instance field. */
|
||||
class InstanceField extends Field {
|
||||
InstanceField() { not this.isStatic() }
|
||||
|
||||
@@ -15,6 +15,7 @@ module;
|
||||
import Member
|
||||
import Modifier
|
||||
import JDK
|
||||
private import semmle.code.java.Overlay
|
||||
|
||||
/**
|
||||
* Holds if reference type `t` is an immediate super-type of `sub`.
|
||||
@@ -998,6 +999,10 @@ class ClassOrInterface extends RefType, @classorinterface {
|
||||
CompanionObject getCompanionObject() { type_companion_object(this, _, result) }
|
||||
}
|
||||
|
||||
overlay[local]
|
||||
private class DiscardableClassOrInterface extends DiscardableReferableLocatable, @classorinterface {
|
||||
}
|
||||
|
||||
private string getAPublicObjectMethodSignature() {
|
||||
exists(Method m |
|
||||
m.getDeclaringType() instanceof TypeObject and
|
||||
|
||||
Reference in New Issue
Block a user