-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathMicronautConfig.qll
More file actions
41 lines (36 loc) · 1.32 KB
/
MicronautConfig.qll
File metadata and controls
41 lines (36 loc) · 1.32 KB
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
36
37
38
39
40
41
/** Provides classes for identifying Micronaut configuration injection sources. */
overlay[local?]
module;
import java
/** The annotation type `@Value` from `io.micronaut.context.annotation`. */
class MicronautValueAnnotation extends AnnotationType {
MicronautValueAnnotation() { this.hasQualifiedName("io.micronaut.context.annotation", "Value") }
}
/** The annotation type `@Property` from `io.micronaut.context.annotation`. */
class MicronautPropertyAnnotation extends AnnotationType {
MicronautPropertyAnnotation() {
this.hasQualifiedName("io.micronaut.context.annotation", "Property")
}
}
/**
* A field annotated with Micronaut's `@Value` or `@Property` annotation,
* representing an injected configuration value.
*/
class MicronautConfigField extends Field {
MicronautConfigField() {
this.getAnAnnotation().getType() instanceof MicronautValueAnnotation
or
this.getAnAnnotation().getType() instanceof MicronautPropertyAnnotation
}
}
/**
* A parameter annotated with Micronaut's `@Value` or `@Property` annotation,
* representing an injected configuration value.
*/
class MicronautConfigParameter extends Parameter {
MicronautConfigParameter() {
this.getAnAnnotation().getType() instanceof MicronautValueAnnotation
or
this.getAnAnnotation().getType() instanceof MicronautPropertyAnnotation
}
}