Package io.micronaut.context
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>(@NonNull Argument<T> type, @Nullable Qualifier<T> qualifier, @NonNull 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 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
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, 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 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
isEnabledMethods inherited from interface io.micronaut.inject.BeanDefinition
findMethod, findPossibleMethods, getBeanDescription, getBeanDescription, getConstructor, getContainerElement, getDeclaringType, getExecutableMethods, getInjectedFields, getInjectedMethods, getName, getPostConstructMethods, getPreDestroyMethods, getRequiredComponents, getRequiredMethod, getScope, getScopeName, getTypeArguments, getTypeArguments, getTypeArguments, getTypeInformation, getTypeParameters, getTypeParameters, hasAnnotatedMethod, isAbstract, isCandidateBean, isIterable, isProxy, resolveDynamicQualifierMethods inherited from interface io.micronaut.inject.BeanDefinitionReference
isContextScope, isProxiedBean, isProxyTarget, loadMethods inherited from interface io.micronaut.inject.BeanType
getBeanName, getExposedTypes, isContainerType, isPrimary, requiresMethodProcessing
-
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:BeanDefinitionResolve the declared qualifier for this bean.- Specified by:
getDeclaredQualifierin interfaceBeanDefinition<T>- 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
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
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
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
qualifier
Returns the value of thequalifierrecord component.- Returns:
- the value of the
qualifierrecord component
-
reasons
Returns the value of thereasonsrecord component.- Returns:
- the value of the
reasonsrecord component
-