Interface SecurityAnnotationScanner<A extends Annotation>
- Type Parameters:
A
- the annotation to search for and synthesize
<A>
.
Implementations should support meta-annotations. This is usually by way of the
MergedAnnotations
API.
Synthesis generally refers to the process of taking an annotation's meta-annotations and placeholders, resolving them, and then combining these elements into a facade of the raw annotation instance.
Since the process of synthesizing an annotation can be expensive, it's recommended to cache the synthesized annotation to prevent multiple computations.
- Since:
- 6.4
- See Also:
-
UniqueSecurityAnnotationScanner
ExpressionTemplateSecurityAnnotationScanner
-
Method Summary
-
Method Details
-
scan
Scan for an annotation of typeA
, starting from the given method.Implementations should fail if they encounter more than one annotation of that type attributable to the method.
Implementations should describe their strategy for searching the element and any surrounding class, interfaces, or super-class.
- Parameters:
method
- the method to search fromtargetClass
- the target class for the method- Returns:
- the synthesized annotation or
null
if not found
-
scan
Scan for an annotation of typeA
, starting from the given method parameter.Implementations should fail if they encounter more than one annotation of that type attributable to the parameter.
Implementations should describe their strategy for searching the element and any surrounding class, interfaces, or super-class.
- Parameters:
element
- the element to search- Returns:
- the synthesized annotation or
null
if not found
-