Record Class DisabledBean<T>
java.lang.Object
java.lang.Record
io.micronaut.context.DisabledBean<T>
- Type Parameters:
T- The bean type- Record Components:
type- The bean typequalifier- The qualifierreasons- The reasons the bean is disabled
- All Implemented Interfaces:
AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, BeanInfo<T>, Named, Ordered, ArgumentCoercible<T>, BeanContextConditional, BeanDefinition<T>, BeanDefinitionReference<T>, BeanType<T>, QualifiedBeanType<T>
public record DisabledBean<T>(Argument<T> type, @Nullable Qualifier<T> qualifier, List<String> reasons)
extends Record
implements BeanDefinition<T>, BeanDefinitionReference<T>
Data about a disabled bean. Used to improve error reporting.
-
Field Summary
Fields inherited from interface AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBERFields inherited from interface AnnotationSource
EMPTYFields inherited from interface Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the bean type.Resolve the declared qualifier for this bean.inthashCode()Returns a hash code value for this object.booleanbooleanisEnabled(BeanContext context, @Nullable BeanResolutionContext resolutionContext) Return whether this component is enabled for the given context.booleanbooleanload()Loads the bean definition.Returns the value of thequalifierrecord component.reasons()Returns the value of thereasonsrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.Methods inherited from interface AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresentMethods inherited from interface 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 AnnotationMetadataProvider
getAnnotationMetadataMethods inherited from interface BeanContextConditional
isEnabledMethods inherited from interface BeanDefinition
findMethod, findPossibleMethods, getBeanDescription, getBeanDescription, getConstructor, getContainerElement, getDeclaringType, getDefaultImplementation, getExecutableMethods, getExecutableMethodsForProcessing, getInjectedFields, getInjectedMethods, getName, getPostConstructMethods, getPreDestroyMethods, getReplacesDefinition, getRequiredComponents, getRequiredMethod, getScope, getScopeName, getTypeArguments, getTypeArguments, getTypeArguments, getTypeInformation, getTypeParameters, getTypeParameters, hasAnnotatedMethod, isAbstract, isCanBeReplaced, isCandidateBean, isIterable, isProxyMethods inherited from interface BeanDefinitionReference
getIndexes, isContextScope, isParallel, isProxiedBean, isProxyTarget, loadMethods inherited from interface BeanType
getBeanName, getExposedTypes, isContainerType, isPrimary, requiresMethodProcessingMethods inherited from interface QualifiedBeanType
resolveDynamicQualifier
-
Constructor Details
-
Method Details
-
isEnabled
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
-
isConfigurationProperties
public boolean isConfigurationProperties()- Specified by:
isConfigurationPropertiesin interfaceBeanDefinition<T>- Specified by:
isConfigurationPropertiesin interfaceBeanDefinitionReference<T>- Returns:
- Is the type configuration properties.
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceBeanDefinition<T>- Specified by:
isSingletonin interfaceBeanDefinitionReference<T>- Returns:
- Whether the scope is singleton
-
getDeclaredQualifier
Description copied from interface:QualifiedBeanTypeResolve the declared qualifier for this bean.- Specified by:
getDeclaredQualifierin interfaceQualifiedBeanType<T>- Returns:
- The qualifier or null if this isn't one
-
getBeanType
Description copied from interface:BeanTypeReturns the bean type.- Specified by:
getBeanTypein interfaceBeanDefinition<T>- Specified by:
getBeanTypein interfaceBeanInfo<T>- Specified by:
getBeanTypein interfaceBeanType<T>- Returns:
- The produced bean type
-
asArgument
- Specified by:
asArgumentin interfaceArgumentCoercible<T>- Specified by:
asArgumentin interfaceBeanDefinition<T>- Specified by:
asArgumentin interfaceBeanInfo<T>- Returns:
- The argument
-
getGenericBeanType
- Specified by:
getGenericBeanTypein interfaceBeanDefinition<T>- Specified by:
getGenericBeanTypein interfaceBeanInfo<T>- Returns:
- The generic bean type
-
getBeanDefinitionName
- Specified by:
getBeanDefinitionNamein interfaceBeanDefinitionReference<T>- Returns:
- The class name of the backing
BeanDefinition
-
load
Description copied from interface:BeanDefinitionReferenceLoads the bean definition.- Specified by:
loadin interfaceBeanDefinitionReference<T>- Returns:
- The loaded component definition or null if it shouldn't be loaded
-
isPresent
public boolean isPresent()- Specified by:
isPresentin interfaceBeanDefinitionReference<T>- Returns:
- Is the underlying bean type present on the classpath
-
hashCode
-
toString
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
type
-
qualifier
-
reasons
-