mirror of
https://github.com/github/codeql.git
synced 2026-06-14 17:31:09 +02:00
Improve reflective class names
This commit is contained in:
@@ -173,7 +173,7 @@ class LiveClass extends SourceClassOrInterface {
|
||||
exists(NestedType r | r.getEnclosingType() = this | r instanceof LiveClass)
|
||||
or
|
||||
// An annotation on the class is reflectively accessed.
|
||||
exists(ReflectiveAnnotationCall reflectiveAnnotationCall |
|
||||
exists(ReflectiveGetAnnotationCall reflectiveAnnotationCall |
|
||||
this = reflectiveAnnotationCall.getInferredClassType() and
|
||||
isLive(reflectiveAnnotationCall.getEnclosingCallable())
|
||||
)
|
||||
|
||||
@@ -130,7 +130,7 @@ class JUnitAnnotatedField extends ReflectivelyReadField {
|
||||
*/
|
||||
class ClassReflectivelyReadField extends ReflectivelyReadField {
|
||||
ClassReflectivelyReadField() {
|
||||
exists(ReflectiveFieldCall fieldAccess | this = fieldAccess.inferAccessedField())
|
||||
exists(ReflectiveGetFieldCall fieldAccess | this = fieldAccess.inferAccessedField())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ class NewInstanceCall extends EntryPoint, NewInstance {
|
||||
/**
|
||||
* A call to either `Class.getMethod(...)` or `Class.getDeclaredMethod(...)`.
|
||||
*/
|
||||
class ReflectiveMethodCallEntryPoint extends EntryPoint, ReflectiveMethodCall {
|
||||
class ReflectiveGetMethodCallEntryPoint extends EntryPoint, ReflectiveGetMethodCall {
|
||||
override Method getALiveCallable() {
|
||||
result = this.inferAccessedMethod() and
|
||||
// The `getMethod(...)` call must be used in a live context.
|
||||
@@ -172,8 +172,8 @@ class ReflectiveMethodCallEntryPoint extends EntryPoint, ReflectiveMethodCall {
|
||||
}
|
||||
}
|
||||
|
||||
/** DEPRECATED: Alias for `ReflectiveMethodCallEntryPoint`. */
|
||||
deprecated class ReflectiveMethodAccessEntryPoint = ReflectiveMethodCallEntryPoint;
|
||||
/** DEPRECATED: Alias for `ReflectiveGetMethodCallEntryPoint`. */
|
||||
deprecated class ReflectiveMethodAccessEntryPoint = ReflectiveGetMethodCallEntryPoint;
|
||||
|
||||
/**
|
||||
* Classes that are entry points recognised by annotations.
|
||||
|
||||
Reference in New Issue
Block a user