/** * All {@link Condition} classes that must {@linkplain Condition#matches match} * in order for the component to be registered. */ Class<? extendsCondition>[] value();
/** * Determine if the condition matches. * @param context the condition context * @param metadata the metadata of the {@link org.springframework.core.type.AnnotationMetadata class} * or {@link org.springframework.core.type.MethodMetadata method} being checked * @return {@code true} if the condition matches and the component can be registered, * or {@code false} to veto the annotated component's registration */ booleanmatches(ConditionContext context, AnnotatedTypeMetadata metadata);
/** * The classes that must be present. Since this annotation is parsed by loading class * bytecode, it is safe to specify classes here that may ultimately not be on the * classpath, only if this annotation is directly on the affected component and * <b>not</b> if this annotation is used as a composed, meta-annotation. In order to * use this annotation as a meta-annotation, only use the {@link #name} attribute. * @return the classes that must be present */ Class<?>[] value() default {};
/** * The classes names that must be present. * @return the class names that must be present. */ String[] name() default {};
/** * The class types of beans that should be checked. The condition matches when beans * of all classes specified are contained in the {@link BeanFactory}. * @return the class types of beans to check */ Class<?>[] value() default {};
/** * The class type names of beans that should be checked. The condition matches when * beans of all classes specified are contained in the {@link BeanFactory}. * @return the class type names of beans to check */ String[] type() default {};
/** * The annotation type decorating a bean that should be checked. The condition matches * when all of the annotations specified are defined on beans in the * {@link BeanFactory}. * @return the class-level annotation types to check */ Class<? extendsAnnotation>[] annotation() default {};
/** * The names of beans to check. The condition matches when all of the bean names * specified are contained in the {@link BeanFactory}. * @return the names of beans to check */ String[] name() default {};
/** * Strategy to decide if the application context hierarchy (parent contexts) should be * considered. * @return the search strategy */ SearchStrategy search()default SearchStrategy.ALL;
/** * Additional classes that may contain the specified bean types within their generic * parameters. For example, an annotation declaring {@code value=Name.class} and * {@code parameterizedContainer=NameRegistration.class} would detect both * {@code Name} and {@code NameRegistration<Name>}. * @return the container types * @since 2.1.0 */ Class<?>[] parameterizedContainer() default {};
/** * The class types of beans that should be checked. The condition matches when no bean * of each class specified is contained in the {@link BeanFactory}. * @return the class types of beans to check */ Class<?>[] value() default {};
/** * The class type names of beans that should be checked. The condition matches when no * bean of each class specified is contained in the {@link BeanFactory}. * @return the class type names of beans to check */ String[] type() default {};
/** * The class types of beans that should be ignored when identifying matching beans. * @return the class types of beans to ignore * @since 1.2.5 */ Class<?>[] ignored() default {};
/** * The class type names of beans that should be ignored when identifying matching * beans. * @return the class type names of beans to ignore * @since 1.2.5 */ String[] ignoredType() default {};
/** * The annotation type decorating a bean that should be checked. The condition matches * when each annotation specified is missing from all beans in the * {@link BeanFactory}. * @return the class-level annotation types to check */ Class<? extendsAnnotation>[] annotation() default {};
/** * The names of beans to check. The condition matches when each bean name specified is * missing in the {@link BeanFactory}. * @return the names of beans to check */ String[] name() default {};
/** * Strategy to decide if the application context hierarchy (parent contexts) should be * considered. * @return the search strategy */ SearchStrategy search()default SearchStrategy.ALL;
/** * Additional classes that may contain the specified bean types within their generic * parameters. For example, an annotation declaring {@code value=Name.class} and * {@code parameterizedContainer=NameRegistration.class} would detect both * {@code Name} and {@code NameRegistration<Name>}. * @return the container types * @since 2.1.0 */ Class<?>[] parameterizedContainer() default {};
/** * Alias for {@link #name()}. * @return the names */ String[] value() default {};
/** * A prefix that should be applied to each property. The prefix automatically ends * with a dot if not specified. A valid prefix is defined by one or more words * separated with dots (e.g. {@code "acme.system.feature"}). * @return the prefix */ String prefix()default"";
/** * The name of the properties to test. If a prefix has been defined, it is applied to * compute the full key of each property. For instance if the prefix is * {@code app.config} and one value is {@code my-value}, the full key would be * {@code app.config.my-value} * <p> * Use the dashed notation to specify each property, that is all lower case with a "-" * to separate words (e.g. {@code my-long-property}). * @return the names */ String[] name() default {};
/** * The string representation of the expected value for the properties. If not * specified, the property must <strong>not</strong> be equal to {@code false}. * @return the expected value */ String havingValue()default"";
/** * Specify if the condition should match if the property is not set. Defaults to * {@code false}. * @return if should match if the property is missing */ booleanmatchIfMissing()defaultfalse;