Class 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 an Argument as a BeanType. Useful in combination with qualifiers.
    Since:
    1.2
    • 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
    • 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.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 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 interface BeanType<T>
        Specified by:
        isContainerType in interface io.micronaut.core.type.TypeInformation<T>
        Returns:
        Whether the type is a container type like Iterable.
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface io.micronaut.core.type.Argument<T>
        Specified by:
        getName in interface BeanType<T>
        Specified by:
        getName in interface io.micronaut.core.naming.Named
        Returns:
        The class name
      • getAnnotationMetadata

        public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
        Specified by:
        getAnnotationMetadata in interface io.micronaut.core.annotation.AnnotationMetadataProvider
      • getTypeVariables

        public java.util.Map<java.lang.String,​io.micronaut.core.type.Argument<?>> getTypeVariables()
        Specified by:
        getTypeVariables in interface io.micronaut.core.type.TypeVariableResolver
      • getType

        public java.lang.Class<T> getType()
        Specified by:
        getType in interface io.micronaut.core.type.TypeInformation<T>
      • equalsType

        public boolean equalsType​(@Nullable
                                  io.micronaut.core.type.Argument<?> other)
        Specified by:
        equalsType in interface io.micronaut.core.type.Argument<T>
      • typeHashCode

        public int typeHashCode()
        Specified by:
        typeHashCode in interface io.micronaut.core.type.Argument<T>
      • isPrimary

        public boolean isPrimary()
        Specified by:
        isPrimary in interface BeanType<T>
        Returns:
        Whether the bean definition is the Primary
      • getBeanType

        public java.lang.Class<T> getBeanType()
        Description copied from interface: BeanType
        Returns the bean type.
        Specified by:
        getBeanType in interface BeanType<T>
        Returns:
        The underlying bean type