Package io.micronaut.context
Class AbstractInitializableBeanDefinitionAndReference<T>
java.lang.Object
io.micronaut.context.AbstractInitializableBeanDefinition<T>
io.micronaut.context.AbstractInitializableBeanDefinitionAndReference<T>
- Type Parameters:
T
- The bean type
- All Implemented Interfaces:
BeanContextConfigurable
,EnvironmentConfigurable
,AnnotationMetadata
,AnnotationMetadataDelegate
,AnnotationMetadataProvider
,AnnotationSource
,BeanInfo<T>
,Named
,Ordered
,ArgumentCoercible<T>
,BeanContextConditional
,BeanDefinition<T>
,BeanDefinitionReference<T>
,BeanType<T>
,InjectableBeanDefinition<T>
,InstantiatableBeanDefinition<T>
,QualifiedBeanType<T>
public abstract class AbstractInitializableBeanDefinitionAndReference<T>
extends AbstractInitializableBeanDefinition<T>
implements BeanDefinitionReference<T>
A variation of
AbstractInitializableBeanDefinition
that is also a BeanDefinitionReference
.- Since:
- 4.4.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested classes/interfaces inherited from class io.micronaut.context.AbstractInitializableBeanDefinition
AbstractInitializableBeanDefinition.AnnotationReference, AbstractInitializableBeanDefinition.FieldReference, AbstractInitializableBeanDefinition.MethodOrFieldReference, AbstractInitializableBeanDefinition.MethodReference, AbstractInitializableBeanDefinition.PrecalculatedInfo
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractInitializableBeanDefinitionAndReference
(Class<T> beanType, @Nullable AbstractInitializableBeanDefinition.MethodOrFieldReference constructor, @Nullable AnnotationMetadata annotationMetadata, @Nullable AbstractInitializableBeanDefinition.MethodReference[] methodInjection, @Nullable AbstractInitializableBeanDefinition.FieldReference[] fieldInjection, @Nullable AbstractInitializableBeanDefinition.AnnotationReference[] annotationInjection, @Nullable ExecutableMethodsDefinition<T> executableMethodsDefinition, @Nullable Map<String, Argument<?>[]> typeArgumentsMap, @NonNull AbstractInitializableBeanDefinition.PrecalculatedInfo precalculatedInfo) -
Method Summary
Modifier and TypeMethodDescriptionfinal String
RepresentsBeanDefinitionReference.getBeanDefinitionName()
when the class implementsBeanDefinitionReference
.int
getOrder()
boolean
isEnabled
(@NonNull BeanContext context, @Nullable BeanResolutionContext resolutionContext) Return whether this component is enabled for the given context.final boolean
Method returns always true, otherwise class not found would eliminate the instance.final BeanDefinition<T>
load
(BeanContext context) Loads the bean definition for the currentBeanContext
.Methods inherited from class io.micronaut.context.AbstractInitializableBeanDefinition
checkIfShouldLoad, checkInjectedBeanPropertyValue, configure, configure, containsProperties, containsProperties, containsPropertiesValue, containsPropertyValue, containsValueForField, containsValueForMethodArgument, doInstantiate, equals, findBeanForConstructorArgument, findBeanForField, findBeanForMethodArgument, findMethod, findPossibleMethods, getAnnotationMetadata, getBeanForAnnotation, getBeanForConstructorArgument, getBeanForField, getBeanForMethodArgument, getBeanForSetter, getBeanRegistrationForConstructorArgument, getBeanRegistrationForField, getBeanRegistrationForMethodArgument, getBeanRegistrationsForConstructorArgument, getBeanRegistrationsForField, getBeanRegistrationsForMethodArgument, getBeansOfTypeForConstructorArgument, getBeansOfTypeForField, getBeansOfTypeForMethodArgument, getBeansOfTypeForSetter, getBeanType, getConstructor, getContainerElement, getDeclaredQualifier, getDeclaringType, getEvaluatedExpressionValueForConstructorArgument, getEvaluatedExpressionValueForMethodArgument, getExecutableMethods, getExposedTypes, getInjectedFields, getInjectedMethods, getMapOfTypeForConstructorArgument, getMapOfTypeForField, getMapOfTypeForMethodArgument, getName, getPostConstructMethods, getPreDestroyMethods, getPropertyPlaceholderValueForConstructorArgument, getPropertyPlaceholderValueForField, getPropertyPlaceholderValueForMethodArgument, getPropertyPlaceholderValueForSetter, getPropertyValueForConstructorArgument, getPropertyValueForField, getPropertyValueForMethodArgument, getPropertyValueForSetter, getRequiredArguments, getRequiredComponents, getScope, getScopeName, getStreamOfTypeForConstructorArgument, getStreamOfTypeForField, getStreamOfTypeForMethodArgument, getTypeArguments, getValueForConstructorArgument, getValueForField, getValueForMethodArgument, getValueForPath, hasEvaluatedExpressions, hashCode, hasPropertyExpressions, inject, instantiate, invokeMethodWithReflection, isAbstract, isConfigurationProperties, isContainerType, isInnerConfiguration, isIterable, isPrimary, isSingleton, postConstruct, preDestroy, requiresMethodProcessing, setFieldWithReflection, toString, warn, warnMissingProperty
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresent
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, copyAnnotationMetadata, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByName, getAnnotationValuesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByName, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getTargetAnnotationMetadata, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
getAnnotationMetadata
Methods inherited from interface io.micronaut.inject.BeanContextConditional
isEnabled, isEnabled
Methods inherited from interface io.micronaut.inject.BeanDefinition
asArgument, getGenericBeanType, getRequiredMethod, getTypeArguments, getTypeArguments, getTypeParameters, getTypeParameters, hasAnnotatedMethod, isCandidateBean, isProxy, resolveDynamicQualifier
Methods inherited from interface io.micronaut.inject.BeanDefinitionReference
isConfigurationProperties, isContextScope, isProxiedBean, isProxyTarget, isSingleton, load
Methods inherited from interface io.micronaut.inject.BeanType
getBeanName, getExposedTypes, isContainerType, isPrimary, requiresMethodProcessing
Methods inherited from interface io.micronaut.inject.InjectableBeanDefinition
inject
Methods inherited from interface io.micronaut.inject.InstantiatableBeanDefinition
instantiate, instantiate
-
Constructor Details
-
AbstractInitializableBeanDefinitionAndReference
protected AbstractInitializableBeanDefinitionAndReference(Class<T> beanType, @Nullable @Nullable AbstractInitializableBeanDefinition.MethodOrFieldReference constructor, @Nullable @Nullable AnnotationMetadata annotationMetadata, @Nullable @Nullable AbstractInitializableBeanDefinition.MethodReference[] methodInjection, @Nullable @Nullable AbstractInitializableBeanDefinition.FieldReference[] fieldInjection, @Nullable @Nullable AbstractInitializableBeanDefinition.AnnotationReference[] annotationInjection, @Nullable @Nullable ExecutableMethodsDefinition<T> executableMethodsDefinition, @Nullable @Nullable Map<String, Argument<?>[]> typeArgumentsMap, @NonNull @NonNull AbstractInitializableBeanDefinition.PrecalculatedInfo precalculatedInfo)
-
-
Method Details
-
getBeanDefinitionName
RepresentsBeanDefinitionReference.getBeanDefinitionName()
when the class implementsBeanDefinitionReference
.- Specified by:
getBeanDefinitionName
in interfaceBeanDefinitionReference<T>
- Returns:
- The name of this bean definition
-
load
Description copied from interface:BeanDefinitionReference
Loads the bean definition for the currentBeanContext
.- Specified by:
load
in interfaceBeanDefinitionReference<T>
- Parameters:
context
- The bean context- Returns:
- The loaded bean definition or null if it shouldn't be loaded
-
isPresent
public final boolean isPresent()Method returns always true, otherwise class not found would eliminate the instance.- Specified by:
isPresent
in interfaceBeanDefinitionReference<T>
- Returns:
- always true
-
getOrder
public int getOrder() -
isEnabled
public boolean isEnabled(@NonNull @NonNull BeanContext context, @Nullable @Nullable BeanResolutionContext resolutionContext) Description copied from interface:BeanContextConditional
Return whether this component is enabled for the given context.- Specified by:
isEnabled
in interfaceBeanContextConditional
- Parameters:
context
- The contextresolutionContext
- The bean resolution context- Returns:
- True if it is
-