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,io.micronaut.core.annotation.AnnotationMetadata,io.micronaut.core.annotation.AnnotationMetadataDelegate,io.micronaut.core.annotation.AnnotationMetadataProvider,io.micronaut.core.annotation.AnnotationSource,io.micronaut.core.beans.BeanInfo<T>,io.micronaut.core.naming.Named,io.micronaut.core.order.Ordered,io.micronaut.core.type.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
-
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_MEMBERFields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTYFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractInitializableBeanDefinitionAndReference(Class<T> beanType, @Nullable AbstractInitializableBeanDefinition.MethodOrFieldReference constructor, @Nullable io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, @Nullable AbstractInitializableBeanDefinition.MethodReference[] methodInjection, @Nullable AbstractInitializableBeanDefinition.FieldReference[] fieldInjection, @Nullable AbstractInitializableBeanDefinition.AnnotationReference[] annotationInjection, @Nullable ExecutableMethodsDefinition<T> executableMethodsDefinition, @Nullable Map<String, io.micronaut.core.type.Argument<?>[]> typeArgumentsMap, @NonNull AbstractInitializableBeanDefinition.PrecalculatedInfo precalculatedInfo) -
Method Summary
Modifier and TypeMethodDescriptionfinal StringRepresentsBeanDefinitionReference.getBeanDefinitionName()when the class implementsBeanDefinitionReference.intgetOrder()booleanisEnabled(@NonNull BeanContext context, @Nullable BeanResolutionContext resolutionContext) Return whether this component is enabled for the given context.final booleanMethod 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, warnMissingPropertyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresentMethods 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, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
getAnnotationMetadataMethods inherited from interface io.micronaut.inject.BeanContextConditional
isEnabled, isEnabledMethods inherited from interface io.micronaut.inject.BeanDefinition
asArgument, getGenericBeanType, getRequiredMethod, getTypeArguments, getTypeArguments, getTypeParameters, getTypeParameters, hasAnnotatedMethod, isCandidateBean, isProxy, resolveDynamicQualifierMethods inherited from interface io.micronaut.inject.BeanDefinitionReference
isConfigurationProperties, isContextScope, isProxiedBean, isProxyTarget, isSingleton, loadMethods inherited from interface io.micronaut.inject.BeanType
getBeanName, getExposedTypes, isContainerType, isPrimary, requiresMethodProcessingMethods inherited from interface io.micronaut.inject.InjectableBeanDefinition
injectMethods inherited from interface io.micronaut.inject.InstantiatableBeanDefinition
instantiate, instantiate
-
Constructor Details
-
AbstractInitializableBeanDefinitionAndReference
protected AbstractInitializableBeanDefinitionAndReference(Class<T> beanType, @Nullable @Nullable AbstractInitializableBeanDefinition.MethodOrFieldReference constructor, @Nullable @Nullable io.micronaut.core.annotation.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, io.micronaut.core.type.Argument<?>[]> typeArgumentsMap, @NonNull @NonNull AbstractInitializableBeanDefinition.PrecalculatedInfo precalculatedInfo)
-
-
Method Details
-
getBeanDefinitionName
RepresentsBeanDefinitionReference.getBeanDefinitionName()when the class implementsBeanDefinitionReference.- Specified by:
getBeanDefinitionNamein interfaceBeanDefinitionReference<T>- Returns:
- The name of this bean definition
-
load
Description copied from interface:BeanDefinitionReferenceLoads the bean definition for the currentBeanContext.- Specified by:
loadin 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:
isPresentin interfaceBeanDefinitionReference<T>- Returns:
- always true
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceio.micronaut.core.beans.BeanInfo<T>- Specified by:
getOrderin interfaceio.micronaut.core.order.Ordered
-
isEnabled
public boolean isEnabled(@NonNull @NonNull BeanContext context, @Nullable @Nullable BeanResolutionContext resolutionContext) Description copied from interface:BeanContextConditionalReturn whether this component is enabled for the given context.- Specified by:
isEnabledin interfaceBeanContextConditional- Parameters:
context- The contextresolutionContext- The bean resolution context- Returns:
- True if it is
-