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.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

    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(@NonNull io.micronaut.core.type.Argument<T> argument)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equalsType(@Nullable io.micronaut.core.type.Argument<?> other)
     
    io.micronaut.core.annotation.AnnotationMetadata
     
    Returns the bean type.
     
     
    Map<String,io.micronaut.core.type.Argument<?>>
     
    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
    Return whether this component is enabled for the given context.
    boolean
     
    int
     

    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

    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

      public ArgumentBeanType(@NonNull @NonNull io.micronaut.core.type.Argument<T> argument)
      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 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 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 Map<String,io.micronaut.core.type.Argument<?>> getTypeVariables()
      Specified by:
      getTypeVariables in interface io.micronaut.core.type.TypeVariableResolver
    • getType

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

      public boolean equalsType(@Nullable @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 Class<T> getBeanType()
      Description copied from interface: BeanType
      Returns the bean type.
      Specified by:
      getBeanType in interface io.micronaut.core.beans.BeanInfo<T>
      Specified by:
      getBeanType in interface BeanType<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 interface BeanContextConditional
      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 interface BeanContextConditional
      Parameters:
      context - The context
      resolutionContext - The bean resolution context
      Returns:
      True if it is