T
- The bean type@Internal public interface BeanDefinitionReference<T> extends BeanType<T>
A bean definition reference provides a reference to a BeanDefinition
thus
allowing for soft loading of bean definitions without loading the actual types.
This interface implements AnnotationMetadataProvider
thus allowing the bean
metadata to be introspected safely without loading the class or the annotations themselves.
The actual bean will be loaded upon calling the load()
method. Note that consumers of this interface
should call isPresent()
prior to loading to ensure an error does not occur
The class can also decide whether to abort loading the definition by returning null
This interface extends the BeanType
interface which is shared between BeanDefinition
and this type. In addition a
reference can be enabled or disabled (see BeanContextConditional.isEnabled(BeanContext)
)
BeanType
,
BeanDefinition
,
BeanContextConditional
EMPTY
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBeanDefinitionName() |
default boolean |
isConfigurationProperties() |
boolean |
isContextScope() |
boolean |
isPresent() |
default boolean |
isSingleton() |
BeanDefinition<T> |
load()
Loads the bean definition.
|
BeanDefinition<T> |
load(BeanContext context)
Loads the bean definition for the current
BeanContext . |
getBeanType, getName, isPrimary, requiresMethodProcessing
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation
isEnabled, isEnabled
java.lang.String getBeanDefinitionName()
BeanDefinition
BeanDefinition<T> load()
BeanDefinition<T> load(BeanContext context)
BeanContext
.context
- The bean contextboolean isContextScope()
boolean isPresent()
default boolean isSingleton()
default boolean isConfigurationProperties()