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:
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<ApplicationEventPublisher<T>>
,BeanContextConditional
,BeanDefinition<ApplicationEventPublisher<T>>
,BeanDefinitionReference<ApplicationEventPublisher<T>>
,BeanFactory<ApplicationEventPublisher<T>>
,BeanType<ApplicationEventPublisher<T>>
@Internal public final class ApplicationEventPublisherFactory<T> extends java.lang.Object implements BeanDefinition<ApplicationEventPublisher<T>>, BeanFactory<ApplicationEventPublisher<T>>, BeanDefinitionReference<ApplicationEventPublisher<T>>
Constructs instances ofApplicationEventPublisher
.
-
-
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 ApplicationEventPublisherFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationEventPublisher<T>
build(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<ApplicationEventPublisher<T>> definition)
Builds a bean instance.boolean
equals(java.lang.Object o)
io.micronaut.core.annotation.AnnotationMetadata
getAnnotationMetadata()
java.lang.String
getBeanDefinitionName()
java.lang.Class<ApplicationEventPublisher<T>>
getBeanType()
Returns the bean type.java.util.List<io.micronaut.core.type.Argument<?>>
getTypeArguments()
If the bean itself declares any type arguments this method will return the classes that represent those types.java.util.List<io.micronaut.core.type.Argument<?>>
getTypeArguments(java.lang.Class<?> type)
Return the type arguments for the given interface or super type for this bean.int
hashCode()
boolean
isAbstract()
boolean
isCandidateBean(io.micronaut.core.type.Argument<?> beanType)
Return whether this bean type is a candidate for dependency injection for the passed type.boolean
isContainerType()
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
isPresent()
boolean
isSingleton()
BeanDefinition<ApplicationEventPublisher<T>>
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
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, getDeclaredQualifier, getDeclaringType, getExecutableMethods, getInjectedFields, getInjectedMethods, getName, getPostConstructMethods, getPreDestroyMethods, getRequiredComponents, getRequiredMethod, getScope, getScopeName, getTypeArguments, getTypeParameters, getTypeParameters, inject, inject, 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
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in interfaceBeanDefinition<T>
- Returns:
- Whether the bean definition is abstract
-
isCandidateBean
public boolean isCandidateBean(io.micronaut.core.type.Argument<?> beanType)
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
-
getAnnotationMetadata
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
- Specified by:
getAnnotationMetadata
in interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
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
public boolean isEnabled(BeanContext context, BeanResolutionContext resolutionContext)
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
public java.lang.Class<ApplicationEventPublisher<T>> getBeanType()
Description copied from interface:BeanType
Returns the bean type.- Specified by:
getBeanType
in interfaceBeanDefinition<T>
- Specified by:
getBeanType
in interfaceBeanType<T>
- Returns:
- The produced bean type
-
getBeanDefinitionName
public java.lang.String getBeanDefinitionName()
- Specified by:
getBeanDefinitionName
in interfaceBeanDefinitionReference<T>
- Returns:
- The class name of the backing
BeanDefinition
-
load
public BeanDefinition<ApplicationEventPublisher<T>> 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
-
build
public ApplicationEventPublisher<T> build(BeanResolutionContext resolutionContext, BeanContext context, BeanDefinition<ApplicationEventPublisher<T>> definition) throws BeanInstantiationException
Description copied from interface:BeanFactory
Builds a bean instance.- Specified by:
build
in interfaceBeanFactory<T>
- Parameters:
resolutionContext
- The bean resolution contextcontext
- The contextdefinition
- The definition- Returns:
- The instance
- Throws:
BeanInstantiationException
- if the instance could not be instantiated
-
getTypeArguments
@NonNull public java.util.List<io.micronaut.core.type.Argument<?>> getTypeArguments(java.lang.Class<?> type)
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
@NonNull public java.util.List<io.micronaut.core.type.Argument<?>> 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
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-