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
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
Fields 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_ARGUMENTS
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
equalsType
(@Nullable Argument<?> other) Whether the types are equivalent.Supplies the metadata.Returns the bean type.getName()
getType()
boolean
Checks whether the bean type is a container type.boolean
isEnabled
(@NonNull BeanContext context, @Nullable BeanResolutionContext resolutionContext) Return whether this component is enabled for the given context.boolean
isEnabled
(BeanContext context) Return whether this component is enabled for the given context.boolean
int
The hash code including only the types.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, getTargetAnnotationMetadata, 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.core.beans.BeanInfo
asArgument, getGenericBeanType, getOrder
Methods inherited from interface io.micronaut.inject.BeanType
getBeanName, 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
Methods 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:BeanType
Checks whether the bean type is a container type.- Specified by:
isContainerType
in interfaceBeanType<T>
- Specified by:
isContainerType
in interfaceTypeInformation<T>
- Returns:
- Whether the type is a container type like
Iterable
.
-
getName
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProvider
Supplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA
.- Specified by:
getAnnotationMetadata
in interfaceAnnotationMetadataProvider
- Returns:
- The
AnnotationMetadata
-
getTypeVariables
- Specified by:
getTypeVariables
in interfaceTypeVariableResolver
- Returns:
- Obtain a map of the type parameters for the argument
-
getType
- Specified by:
getType
in interfaceTypeInformation<T>
- Returns:
- The type
-
equalsType
Description copied from interface:Argument
Whether 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:
equalsType
in interfaceArgument<T>
- Parameters:
other
- The type- Returns:
- True if they are equal
-
typeHashCode
public int typeHashCode()Description copied from interface:Argument
The 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:
typeHashCode
in interfaceArgument<T>
- Returns:
- The type hash code
-
isPrimary
public boolean isPrimary() -
getBeanType
Description copied from interface:BeanType
Returns the bean type.- Specified by:
getBeanType
in interfaceBeanInfo<T>
- Specified by:
getBeanType
in interfaceBeanType<T>
- Returns:
- The underlying bean type
-
isEnabled
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 @NonNull BeanContext context, @Nullable @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
-