forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGuice.qll
More file actions
35 lines (30 loc) · 991 Bytes
/
Guice.qll
File metadata and controls
35 lines (30 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* Provides classes and predicates for working with the Guice framework.
*/
import java
/**
* A `@com.google.inject.servlet.RequestParameters` annotation.
*/
class GuiceRequestParametersAnnotation extends Annotation {
GuiceRequestParametersAnnotation() {
this.getType().hasQualifiedName("com.google.inject.servlet", "RequestParameters")
}
}
/**
* The interface `com.google.inject.Provider`.
*/
class GuiceProvider extends Interface {
GuiceProvider() { this.hasQualifiedName("com.google.inject", "Provider") }
/**
* The method named `get` declared on the interface `com.google.inject.Provider`.
*/
Method getGetMethod() {
result.getDeclaringType() = this and result.getName() = "get" and result.hasNoParameters()
}
/**
* A method that overrides the `get` method on the interface `com.google.inject.Provider`.
*/
Method getAnOverridingGetMethod() {
exists(Method m | m.getSourceDeclaration() = getGetMethod() | result.overrides*(m))
}
}