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 anArgument
as 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 boolean
equalsType(io.micronaut.core.type.Argument<?> other)
io.micronaut.core.annotation.AnnotationMetadata
getAnnotationMetadata()
java.lang.Class<T>
getBeanType()
Returns the bean type.java.lang.String
getName()
java.lang.Class<T>
getType()
java.util.Map<java.lang.String,io.micronaut.core.type.Argument<?>>
getTypeVariables()
boolean
isContainerType()
Checks whether the bean type is a container type.boolean
isEnabled(BeanContext context)
Return whether this component is enabled for the given context.boolean
isEnabled(BeanContext context, BeanResolutionContext resolutionContext)
Return whether this component is enabled for the given context.boolean
isPrimary()
int
typeHashCode()
-
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:BeanType
Checks whether the bean type is a container type.- Specified by:
isContainerType
in interfaceBeanType<T>
- Specified by:
isContainerType
in 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:
getAnnotationMetadata
in interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
getTypeVariables
public java.util.Map<java.lang.String,io.micronaut.core.type.Argument<?>> getTypeVariables()
- Specified by:
getTypeVariables
in interfaceio.micronaut.core.type.TypeVariableResolver
-
getType
public java.lang.Class<T> getType()
- Specified by:
getType
in interfaceio.micronaut.core.type.TypeInformation<T>
-
equalsType
public boolean equalsType(@Nullable io.micronaut.core.type.Argument<?> other)
- Specified by:
equalsType
in interfaceio.micronaut.core.type.Argument<T>
-
typeHashCode
public int typeHashCode()
- Specified by:
typeHashCode
in interfaceio.micronaut.core.type.Argument<T>
-
isPrimary
public boolean isPrimary()
-
getBeanType
public java.lang.Class<T> getBeanType()
Description copied from interface:BeanType
Returns the bean type.- Specified by:
getBeanType
in interfaceBeanType<T>
- Returns:
- The underlying bean type
-
isEnabled
public boolean isEnabled(BeanContext context)
Description copied from interface:BeanContextConditional
Return whether this component is enabled for the given context.- Specified by:
isEnabled
in interfaceBeanContextConditional
- Parameters:
context
- The context- Returns:
- True if it is
-
isEnabled
public boolean isEnabled(@NonNull BeanContext context, @Nullable 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
-
-