Package io.micronaut.context.event
Class ApplicationEventPublisherFactory<T>
java.lang.Object
io.micronaut.context.event.ApplicationEventPublisherFactory<T>
- Type Parameters:
T
- The generic type
- All Implemented Interfaces:
AnnotationMetadata
,AnnotationMetadataDelegate
,AnnotationMetadataProvider
,AnnotationSource
,BeanInfo<ApplicationEventPublisher<T>>
,Named
,Ordered
,ArgumentCoercible<ApplicationEventPublisher<T>>
,BeanContextConditional
,BeanDefinition<ApplicationEventPublisher<T>>
,BeanDefinitionReference<ApplicationEventPublisher<T>>
,BeanType<ApplicationEventPublisher<T>>
,InstantiatableBeanDefinition<ApplicationEventPublisher<T>>
,QualifiedBeanType<ApplicationEventPublisher<T>>
@Internal
public final class ApplicationEventPublisherFactory<T>
extends Object
implements InstantiatableBeanDefinition<ApplicationEventPublisher<T>>, BeanDefinitionReference<ApplicationEventPublisher<T>>
Constructs instances of
ApplicationEventPublisher
.- Author:
- graemerocher, Denis
-
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Supplies the metadata.Returns the bean type.If the bean itself declares any type arguments this method will return the classes that represent those types.getTypeArguments
(Class<?> type) Return the type arguments for the given interface or super type for this bean.int
hashCode()
instantiate
(BeanResolutionContext resolutionContext, BeanContext context) Builds a bean instance.boolean
boolean
isCandidateBean
(Argument<?> beanType) Return whether this bean type is a candidate for dependency injection for the passed type.boolean
boolean
Checks whether the bean type is a container type.boolean
isEnabled
(BeanContext context, BeanResolutionContext resolutionContext) Return whether this component is enabled for the given context.boolean
boolean
load()
Loads the bean definition.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
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.inject.BeanContextConditional
isEnabled
Methods inherited from interface io.micronaut.inject.BeanDefinition
asArgument, findMethod, findPossibleMethods, getConstructor, getContainerElement, getDeclaredQualifier, getDeclaringType, getExecutableMethods, getGenericBeanType, getInjectedFields, getInjectedMethods, getName, getPostConstructMethods, getPreDestroyMethods, getRequiredComponents, getRequiredMethod, getScope, getScopeName, getTypeArguments, getTypeParameters, getTypeParameters, hasAnnotatedMethod, isIterable, isProxy, resolveDynamicQualifier
Methods inherited from interface io.micronaut.inject.BeanDefinitionReference
isContextScope, isProxiedBean, isProxyTarget, load
Methods inherited from interface io.micronaut.inject.BeanType
getBeanName, getExposedTypes, isPrimary, requiresMethodProcessing
Methods inherited from interface io.micronaut.inject.InstantiatableBeanDefinition
instantiate
-
Constructor Details
-
ApplicationEventPublisherFactory
public ApplicationEventPublisherFactory()
-
-
Method Details
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstract
in interfaceBeanDefinition<T>
- Returns:
- Whether the bean definition is abstract
-
isCandidateBean
Description copied from interface:BeanType
Return whether this bean type is a candidate for dependency injection for the passed type.- Specified by:
isCandidateBean
in interfaceBeanDefinition<T>
- Specified by:
isCandidateBean
in interfaceBeanType<T>
- Parameters:
beanType
- The bean type- Returns:
- True if it is
-
isConfigurationProperties
public boolean isConfigurationProperties()- Specified by:
isConfigurationProperties
in interfaceBeanDefinition<T>
- Specified by:
isConfigurationProperties
in interfaceBeanDefinitionReference<T>
- Returns:
- Is the type configuration properties.
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProvider
Supplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA
.- Specified by:
getAnnotationMetadata
in interfaceAnnotationMetadataProvider
- Returns:
- The
AnnotationMetadata
-
isContainerType
public boolean isContainerType()Description copied from interface:BeanType
Checks whether the bean type is a container type.- Specified by:
isContainerType
in interfaceBeanType<T>
- Returns:
- Whether the type is a container type like
Iterable
.
-
isEnabled
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
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceBeanDefinition<T>
- Specified by:
isSingleton
in interfaceBeanDefinitionReference<T>
- Returns:
- Whether the scope is singleton
-
getBeanType
Description copied from interface:BeanType
Returns the bean type.- Specified by:
getBeanType
in interfaceBeanDefinition<T>
- Specified by:
getBeanType
in interfaceBeanInfo<T>
- Specified by:
getBeanType
in interfaceBeanType<T>
- Returns:
- The produced bean type
-
getBeanDefinitionName
- Specified by:
getBeanDefinitionName
in interfaceBeanDefinitionReference<T>
- Returns:
- The class name of the backing
BeanDefinition
-
load
Description copied from interface:BeanDefinitionReference
Loads the bean definition.- Specified by:
load
in interfaceBeanDefinitionReference<T>
- Returns:
- The loaded component definition or null if it shouldn't be loaded
-
isPresent
public boolean isPresent()- Specified by:
isPresent
in interfaceBeanDefinitionReference<T>
- Returns:
- Is the underlying bean type present on the classpath
-
instantiate
public ApplicationEventPublisher<T> instantiate(BeanResolutionContext resolutionContext, BeanContext context) throws BeanInstantiationException Description copied from interface:InstantiatableBeanDefinition
Builds a bean instance.- Specified by:
instantiate
in interfaceInstantiatableBeanDefinition<T>
- Parameters:
resolutionContext
- The bean resolution contextcontext
- The context- Returns:
- The instance
- Throws:
BeanInstantiationException
- if the instance could not be instantiated
-
getTypeArguments
Description copied from interface:BeanDefinition
Return the type arguments for the given interface or super type for this bean.- Specified by:
getTypeArguments
in interfaceBeanDefinition<T>
- Parameters:
type
- The super class or interface type- Returns:
- The type arguments
-
getTypeArguments
Description copied from interface:BeanDefinition
If the bean itself declares any type arguments this method will return the classes that represent those types.- Specified by:
getTypeArguments
in interfaceBeanDefinition<T>
- Returns:
- The type arguments
-
equals
-
hashCode
public int hashCode()
-