Class AnnotationSynthesizers
java.lang.Object
org.springframework.security.core.annotation.AnnotationSynthesizers
Factory for creating
AnnotationSynthesizer instances.- Since:
- 6.4
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends Annotation>
AnnotationSynthesizer<A>requireUnique(Class<A> type) Create aAnnotationSynthesizerthat requires synthesized annotations to be unique on the givenAnnotatedElement.static <A extends Annotation>
AnnotationSynthesizer<A>requireUnique(Class<A> type, AnnotationTemplateExpressionDefaults templateDefaults) Create aAnnotationSynthesizerthat requires synthesized annotations to be unique on the givenAnnotatedElement.static AnnotationSynthesizer<Annotation>requireUnique(List<Class<? extends Annotation>> types) Create aAnnotationSynthesizerthat requires synthesized annotations to be unique on the givenAnnotatedElement.
-
Method Details
-
requireUnique
Create aAnnotationSynthesizerthat requires synthesized annotations to be unique on the givenAnnotatedElement.- Type Parameters:
A- the annotation type- Parameters:
type- the annotation type- Returns:
- the default
AnnotationSynthesizer
-
requireUnique
public static <A extends Annotation> AnnotationSynthesizer<A> requireUnique(Class<A> type, AnnotationTemplateExpressionDefaults templateDefaults) Create aAnnotationSynthesizerthat requires synthesized annotations to be unique on the givenAnnotatedElement.When a
AnnotationTemplateExpressionDefaultsis provided, it will return a synthesizer that supports placeholders in the annotation's attributes in addition to the meta-annotation synthesizing provided byrequireUnique(Class).- Type Parameters:
A- the annotation type- Parameters:
type- the annotation typetemplateDefaults- the defaults for resolving placeholders in the annotation's attributes- Returns:
- the default
AnnotationSynthesizer
-
requireUnique
public static AnnotationSynthesizer<Annotation> requireUnique(List<Class<? extends Annotation>> types) Create aAnnotationSynthesizerthat requires synthesized annotations to be unique on the givenAnnotatedElement. Supplying multiple types implies that the synthesized annotation must be unique across all specified types.- Parameters:
types- the annotation types- Returns:
- the default
AnnotationSynthesizer
-