Package io.micronaut.inject.provider
Class JavaxProviderBeanDefinition
- java.lang.Object
-
- io.micronaut.inject.provider.AbstractProviderDefinition<javax.inject.Provider<java.lang.Object>>
-
- io.micronaut.inject.provider.JavaxProviderBeanDefinition
-
- All Implemented Interfaces:
io.micronaut.core.annotation.AnnotationMetadata,io.micronaut.core.annotation.AnnotationMetadataDelegate,io.micronaut.core.annotation.AnnotationMetadataProvider,io.micronaut.core.annotation.AnnotationSource,io.micronaut.core.naming.Named,io.micronaut.core.type.ArgumentCoercible<javax.inject.Provider<java.lang.Object>>,BeanContextConditional,BeanDefinition<javax.inject.Provider<java.lang.Object>>,BeanDefinitionReference<javax.inject.Provider<java.lang.Object>>,BeanFactory<javax.inject.Provider<java.lang.Object>>,BeanType<javax.inject.Provider<java.lang.Object>>
@Internal public final class JavaxProviderBeanDefinition extends AbstractProviderDefinition<javax.inject.Provider<java.lang.Object>>
Implementation for javax provider bean lookups.- Since:
- 3.0.0
-
-
Field Summary
-
Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
-
Fields inherited from interface io.micronaut.inject.BeanDefinition
NAMED_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description JavaxProviderBeanDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.inject.Provider<java.lang.Object>buildProvider(BeanResolutionContext resolutionContext, BeanContext context, io.micronaut.core.type.Argument<java.lang.Object> argument, Qualifier<java.lang.Object> qualifier, boolean singleton)Builds a provider implementation.java.lang.Class<javax.inject.Provider<java.lang.Object>>getBeanType()Returns the bean type.booleanisEnabled(BeanContext context, BeanResolutionContext resolutionContext)Return whether this component is enabled for the given context.booleanisPresent()-
Methods inherited from class io.micronaut.inject.provider.AbstractProviderDefinition
build, equals, getAnnotationMetadata, getBeanDefinitionName, getDeclaredQualifier, getTypeArguments, getTypeArguments, hashCode, isAbstract, isAllowEmptyProviders, isContainerType, isSingleton, load
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
getAnnotationValuesByName, getAnnotationValuesByStereotype, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, 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, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, 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.inject.BeanContextConditional
isEnabled
-
Methods inherited from interface io.micronaut.inject.BeanDefinition
asArgument, findMethod, findPossibleMethods, getConstructor, getContainerElement, getDeclaringType, getExecutableMethods, getInjectedFields, getInjectedMethods, getName, getPostConstructMethods, getPreDestroyMethods, getRequiredComponents, getRequiredMethod, getScope, getScopeName, getTypeArguments, getTypeParameters, getTypeParameters, inject, inject, isCandidateBean, isIterable, isProvided, isProxy, resolveDynamicQualifier
-
Methods inherited from interface io.micronaut.inject.BeanDefinitionReference
isConfigurationProperties, isContextScope, load
-
Methods inherited from interface io.micronaut.inject.BeanFactory
build
-
Methods inherited from interface io.micronaut.inject.BeanType
getExposedTypes, getName, isPrimary, requiresMethodProcessing
-
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled(BeanContext context, BeanResolutionContext resolutionContext)
Description copied from interface:BeanContextConditionalReturn whether this component is enabled for the given context.- Specified by:
isEnabledin interfaceBeanContextConditional- Overrides:
isEnabledin classAbstractProviderDefinition<javax.inject.Provider<java.lang.Object>>- Parameters:
context- The contextresolutionContext- The bean resolution context- Returns:
- True if it is
-
getBeanType
public java.lang.Class<javax.inject.Provider<java.lang.Object>> getBeanType()
Description copied from interface:BeanTypeReturns the bean type.- Returns:
- The produced bean type
-
isPresent
public boolean isPresent()
- Specified by:
isPresentin interfaceBeanDefinitionReference<javax.inject.Provider<java.lang.Object>>- Overrides:
isPresentin classAbstractProviderDefinition<javax.inject.Provider<java.lang.Object>>- Returns:
- Is the underlying bean type present on the classpath
-
buildProvider
protected javax.inject.Provider<java.lang.Object> buildProvider(BeanResolutionContext resolutionContext, BeanContext context, io.micronaut.core.type.Argument<java.lang.Object> argument, Qualifier<java.lang.Object> qualifier, boolean singleton)
Description copied from class:AbstractProviderDefinitionBuilds a provider implementation.- Specified by:
buildProviderin classAbstractProviderDefinition<javax.inject.Provider<java.lang.Object>>- Parameters:
resolutionContext- The resolution contextcontext- The contextargument- The argumentqualifier- The qualifiersingleton- Whether the bean is a singleton- Returns:
- The provider
-
-