Add aliases for public, importable renamed classes and predicates.

Also rename and aliases a couple of uses of Access noted along the way.
This commit is contained in:
Chris Smowton
2023-10-24 10:54:35 +01:00
committed by GitHub
parent f552a15aae
commit 59a49eef0b
20 changed files with 93 additions and 19 deletions

View File

@@ -173,9 +173,9 @@ class LiveClass extends SourceClassOrInterface {
exists(NestedType r | r.getEnclosingType() = this | r instanceof LiveClass)
or
// An annotation on the class is reflectively accessed.
exists(ReflectiveAnnotationAccess reflectiveAnnotationAccess |
this = reflectiveAnnotationAccess.getInferredClassType() and
isLive(reflectiveAnnotationAccess.getEnclosingCallable())
exists(ReflectiveAnnotationCall reflectiveAnnotationCall |
this = reflectiveAnnotationCall.getInferredClassType() and
isLive(reflectiveAnnotationCall.getEnclosingCallable())
)
or
this instanceof AnonymousClass

View File

@@ -130,7 +130,7 @@ class JUnitAnnotatedField extends ReflectivelyReadField {
*/
class ClassReflectivelyReadField extends ReflectivelyReadField {
ClassReflectivelyReadField() {
exists(ReflectiveFieldAccess fieldAccess | this = fieldAccess.inferAccessedField())
exists(ReflectiveFieldCall fieldAccess | this = fieldAccess.inferAccessedField())
}
}

View File

@@ -172,6 +172,9 @@ class ReflectiveMethodCallEntryPoint extends EntryPoint, ReflectiveMethodCall {
}
}
/** DEPRECATED: Alias for `ReflectiveMethodCallEntryPoint`. */
deprecated class ReflectiveMethodAccessEntryPoint = ReflectiveMethodCallEntryPoint;
/**
* Classes that are entry points recognised by annotations.
*/