CodeQL library for Java/Kotlin
codeql/java-all 0.9.0 (changelog, source)
Search

Module SpringAutowire

Provides classes and predicates for identifying methods and constructors called by Spring injection.

Import path

import semmle.code.java.frameworks.spring.SpringAutowire

Imports

SpringComponentScan
java

Provides all default Java QL imports.

Predicates

hasInjectAnnotation

Holds if an injection annotation, such as @Autowired or @Inject, is present on this particular annotatable element.

Classes

SpringBeanAutowiredCallable

A callable that is annotated with @Autowired.

SpringBeanAutowiredField

A field that is annotated with @Autowired.

SpringBeanPropertySetterMethod

A setter method called by Spring setter injection due to an explicit property specification in the bean configuration file.

SpringBeanReflectivelyConstructed

A Spring bean specified in an XML configuration file, which we believe will be reflectively constructed.

SpringBeanXmlAutowiredSetterMethod

A setter method that may be called due to some XML specified autowiring in the bean definition for this bean.

SpringComponentConstructor

A constructor on a Spring component.

SpringQualifierAnnotation

A qualifier annotation on a method or field that is used to disambiguate which bean will be used.

SpringQualifierAnnotationType

An annotation type that is treated as a qualifier for Spring.

SpringQualifierDefinitionAnnotation

An annotation marking a SpringComponent with a “qualifier” that will be used to resolve when this component will be used in autowiring another component or bean.

SpringResourceAnnotation

A @Resource annotation on a field or method that specifies that the field or method should be autowired by Spring, and can optionally specify a qualifier in the “name”.