Package io.micronaut.inject
Class ArgumentBeanType<T>
java.lang.Object
io.micronaut.inject.ArgumentBeanType<T>
- Type Parameters:
T- The generic type
- All Implemented Interfaces:
AnnotatedElement,AnnotationMetadataProvider,AnnotationSource,BeanInfo<T>,Named,Ordered,Argument<T>,ArgumentCoercible<T>,TypeInformation<T>,TypeVariableResolver,BeanContextConditional,BeanType<T>,Type
- Since:
- 1.2
- Author:
- graemerocher
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.core.type.TypeInformation
TypeInformation.TypeFormat -
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanequalsType(@Nullable Argument<?> other) Whether the types are equivalent.Supplies the metadata.Returns 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.booleanintThe hash code including only the types.Methods 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, isTypeVariable, withAnnotationMetadata, withNameMethods 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, getBeanTypeString, getSimpleName, getTypeName, getTypeString, 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 interfaceTypeInformation<T>- Returns:
- Whether the type is a container type like
Iterable.
-
getName
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The
AnnotationMetadata
-
getTypeVariables
- Specified by:
getTypeVariablesin interfaceTypeVariableResolver- Returns:
- Obtain a map of the type parameters for the argument
-
getType
- Specified by:
getTypein interfaceTypeInformation<T>- Returns:
- The type
-
equalsType
Description copied from interface:ArgumentWhether the types are equivalent. The regularObject.equals(Object)implementation includes the argument name within the comparison so this method offers a variation that just compares types.- Specified by:
equalsTypein interfaceArgument<T>- Parameters:
other- The type- Returns:
- True if they are equal
-
typeHashCode
public int typeHashCode()Description copied from interface:ArgumentThe hash code including only the types. The regularObject.hashCode()implementation includes the argument name within the comparison so this method offers a variation that just compares types.- Specified by:
typeHashCodein interfaceArgument<T>- Returns:
- The type hash code
-
isPrimary
public boolean isPrimary() -
getBeanType
Description copied from interface:BeanTypeReturns the bean type.- Specified by:
getBeanTypein interfaceBeanInfo<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
-