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.beans.BeanInfo<T>,io.micronaut.core.naming.Named,io.micronaut.core.order.Ordered,io.micronaut.core.type.Argument<T>,io.micronaut.core.type.ArgumentCoercible<T>,io.micronaut.core.type.TypeInformation<T>,io.micronaut.core.type.TypeVariableResolver,BeanContextConditional,BeanType<T>,Type
public final class ArgumentBeanType<T>
extends Object
implements BeanType<T>, io.micronaut.core.type.Argument<T>
Represents an
Argument as a BeanType. Useful in combination with qualifiers.- Since:
- 1.2
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTYFields inherited from interface io.micronaut.core.type.Argument
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LIST_OF_STRING, LONG, OBJECT_ARGUMENT, SHORT, STRING, VOID, VOID_OBJECT, ZERO_ARGUMENTSFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionArgumentBeanType(@NonNull io.micronaut.core.type.Argument<T> argument) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequalsType(@Nullable io.micronaut.core.type.Argument<?> other) io.micronaut.core.annotation.AnnotationMetadataReturns the bean type.getName()getType()booleanChecks whether the bean type is a container type.booleanisEnabled(@NonNull BeanContext context, @Nullable BeanResolutionContext resolutionContext) Return whether this component is enabled for the given context.booleanisEnabled(BeanContext context) Return whether this component is enabled for the given context.booleanintMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullableMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface io.micronaut.core.type.Argument
isAssignableFrom, isAssignableFrom, isInstance, isTypeVariableMethods inherited from interface io.micronaut.core.beans.BeanInfo
asArgument, getGenericBeanType, getOrderMethods inherited from interface io.micronaut.inject.BeanType
getBeanName, getExposedTypes, isCandidateBean, requiresMethodProcessingMethods 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, isWrapperTypeMethods inherited from interface io.micronaut.core.type.TypeVariableResolver
getFirstTypeVariable, getTypeParameters, getTypeVariable
-
Constructor Details
-
ArgumentBeanType
Default constructor.- Parameters:
argument- The argument
-
-
Method Details
-
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
-
getAnnotationMetadata
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()- Specified by:
getAnnotationMetadatain interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
getTypeVariables
- Specified by:
getTypeVariablesin interfaceio.micronaut.core.type.TypeVariableResolver
-
getType
- Specified by:
getTypein interfaceio.micronaut.core.type.TypeInformation<T>
-
equalsType
public boolean equalsType(@Nullable @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
Description copied from interface:BeanTypeReturns the bean type.- Specified by:
getBeanTypein interfaceio.micronaut.core.beans.BeanInfo<T>- Specified by:
getBeanTypein interfaceBeanType<T>- Returns:
- The underlying bean type
-
isEnabled
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 @NonNull BeanContext context, @Nullable @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
-