Package io.micronaut.inject
Class ArgumentBeanType<T>
- java.lang.Object
-
- io.micronaut.inject.ArgumentBeanType<T>
-
- Type Parameters:
T- The generic type
- All Implemented Interfaces:
io.micronaut.core.annotation.AnnotatedElement,io.micronaut.core.annotation.AnnotationMetadataProvider,io.micronaut.core.annotation.AnnotationSource,io.micronaut.core.naming.Named,io.micronaut.core.type.Argument<T>,io.micronaut.core.type.TypeInformation<T>,io.micronaut.core.type.TypeVariableResolver,BeanContextConditional,BeanType<T>,java.lang.reflect.Type
public final class ArgumentBeanType<T> extends java.lang.Object implements BeanType<T>, io.micronaut.core.type.Argument<T>
Represents anArgumentas aBeanType. Useful in combination with qualifiers.- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor Description ArgumentBeanType(io.micronaut.core.type.Argument<T> argument)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequalsType(io.micronaut.core.type.Argument<?> other)io.micronaut.core.annotation.AnnotationMetadatagetAnnotationMetadata()java.lang.Class<T>getBeanType()Returns the bean type.java.lang.StringgetName()java.lang.Class<T>getType()java.util.Map<java.lang.String,io.micronaut.core.type.Argument<?>>getTypeVariables()booleanisContainerType()Checks whether the bean type is a container type.booleanisEnabled(BeanContext context)Return whether this component is enabled for the given context.booleanisEnabled(BeanContext context, BeanResolutionContext resolutionContext)Return whether this component is enabled for the given context.booleanisPrimary()inttypeHashCode()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micronaut.core.annotation.AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
-
Methods inherited from interface io.micronaut.core.type.Argument
isAssignableFrom, isAssignableFrom, isInstance, isTypeVariable
-
Methods inherited from interface io.micronaut.inject.BeanType
getExposedTypes, isCandidateBean, requiresMethodProcessing
-
Methods inherited from interface io.micronaut.core.type.TypeInformation
asParameterizedType, asType, getSimpleName, getTypeName, getTypeString, getWrappedType, getWrapperType, hasTypeVariables, isArray, isAsync, isAsyncOrReactive, isCompletable, isOptional, isPrimitive, isProvider, isReactive, isSpecifiedSingle, isVoid, isWrapperType
-
-
-
-
Constructor Detail
-
ArgumentBeanType
public ArgumentBeanType(@NonNull io.micronaut.core.type.Argument<T> argument)Default constructor.- Parameters:
argument- The argument
-
-
Method Detail
-
isContainerType
public boolean isContainerType()
Description copied from interface:BeanTypeChecks whether the bean type is a container type.- Specified by:
isContainerTypein interfaceBeanType<T>- Specified by:
isContainerTypein interfaceio.micronaut.core.type.TypeInformation<T>- Returns:
- Whether the type is a container type like
Iterable.
-
getName
public java.lang.String getName()
-
getAnnotationMetadata
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
- Specified by:
getAnnotationMetadatain interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
getTypeVariables
public java.util.Map<java.lang.String,io.micronaut.core.type.Argument<?>> getTypeVariables()
- Specified by:
getTypeVariablesin interfaceio.micronaut.core.type.TypeVariableResolver
-
getType
public java.lang.Class<T> getType()
- Specified by:
getTypein interfaceio.micronaut.core.type.TypeInformation<T>
-
equalsType
public boolean equalsType(@Nullable io.micronaut.core.type.Argument<?> other)- Specified by:
equalsTypein interfaceio.micronaut.core.type.Argument<T>
-
typeHashCode
public int typeHashCode()
- Specified by:
typeHashCodein interfaceio.micronaut.core.type.Argument<T>
-
isPrimary
public boolean isPrimary()
-
getBeanType
public java.lang.Class<T> getBeanType()
Description copied from interface:BeanTypeReturns the bean type.- Specified by:
getBeanTypein interfaceBeanType<T>- Returns:
- The underlying bean type
-
isEnabled
public boolean isEnabled(BeanContext context)
Description copied from interface:BeanContextConditionalReturn whether this component is enabled for the given context.- Specified by:
isEnabledin interfaceBeanContextConditional- Parameters:
context- The context- Returns:
- True if it is
-
isEnabled
public boolean isEnabled(@NonNull BeanContext context, @Nullable BeanResolutionContext resolutionContext)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
-
-