Interface BeanConfiguration
- All Superinterfaces:
AnnotationMetadataProvider, AnnotationSource, BeanContextConditional
- All Known Implementing Classes:
AbstractBeanConfiguration
A BeanConfiguration is a grouping of several
BeanDefinition instances.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from interface AnnotationSource
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionstatic BeanConfigurationProgrammatically disable beans within a package.getName()@Nullable StringThe version of this configuration.default booleanisWithin(BeanDefinitionReference<?> beanDefinitionReference) Check whether the specified bean definition class is within this bean configuration.default booleanCheck whether the specified class is within this bean configuration.default booleanCheck whether the specified class is within this bean configuration.static BeanConfigurationof(Package thePackage, Predicate<BeanContext> condition) Programmatically create a bean configuration for the given package.static BeanConfigurationof(String thePackage, Predicate<BeanContext> condition) Programmatically create a bean configuration for the given package.Methods inherited from interface AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface BeanContextConditional
isEnabled, isEnabled
-
Method Details
-
getPackage
Package getPackage()- Returns:
- The package for the bean configuration
-
getName
String getName()- Returns:
- The package name this configuration
-
getVersion
@Nullable String getVersion()The version of this configuration. Note: returns null when called on a configuration not provided by a JAR.- Returns:
- The version or null
-
isWithin
Check whether the specified bean definition class is within this bean configuration.- Parameters:
beanDefinitionReference- The bean definition class- Returns:
- True if it is
-
isWithin
Check whether the specified class is within this bean configuration.- Parameters:
className- The class name- Returns:
- True if it is
-
isWithin
Check whether the specified class is within this bean configuration.- Parameters:
cls- The class- Returns:
- True if it is
-
of
Programmatically create a bean configuration for the given package.- Parameters:
thePackage- The packagecondition- The condition- Returns:
- The bean configuration
- Since:
- 4.8.0
-
of
Programmatically create a bean configuration for the given package.- Parameters:
thePackage- The packagecondition- The condition- Returns:
- The bean configuration
- Since:
- 4.8.0
-
disabled
Programmatically disable beans within a package.- Parameters:
thePackage- The package name- Returns:
- The bean configuration
- Since:
- 4.8.0
-