Class DefaultArgument<T>

    • Field Detail

      • CONTAINER_TYPES

        public static final java.util.Set<java.lang.Class<?>> CONTAINER_TYPES
      • PROVIDER_TYPES

        public static final java.util.Set<java.lang.String> PROVIDER_TYPES
    • Constructor Detail

      • DefaultArgument

        public DefaultArgument​(java.lang.Class<T> type,
                               java.lang.String name,
                               AnnotationMetadata annotationMetadata,
                               Argument<?>... genericTypes)
        Parameters:
        type - The type
        name - The name
        annotationMetadata - The annotation metadata
        genericTypes - The generic types
      • DefaultArgument

        public DefaultArgument​(java.lang.Class<T> type,
                               AnnotationMetadata annotationMetadata,
                               Argument<?>... genericTypes)
        Parameters:
        type - The type
        annotationMetadata - The annotation metadata
        genericTypes - The generic types
      • DefaultArgument

        public DefaultArgument​(java.lang.Class<T> type,
                               java.lang.String name,
                               AnnotationMetadata annotationMetadata,
                               java.util.Map<java.lang.String,​Argument<?>> typeParameters,
                               Argument<?>[] typeParameterArray)
        Parameters:
        type - The type
        name - The name
        annotationMetadata - The annotation metadata
        typeParameters - The map of parameters
        typeParameterArray - The array of arguments
      • DefaultArgument

        public DefaultArgument​(java.lang.Class<T> type,
                               java.lang.String name,
                               AnnotationMetadata annotationMetadata,
                               boolean isTypeVariable,
                               Argument<?>... genericTypes)
        Parameters:
        type - The type
        name - The name
        annotationMetadata - The annotation metadata
        isTypeVariable - Is this argument a type variable
        genericTypes - The generic types
      • DefaultArgument

        protected DefaultArgument​(java.lang.Class<T> type,
                                  java.lang.String name,
                                  AnnotationMetadata annotationMetadata,
                                  java.util.Map<java.lang.String,​Argument<?>> typeParameters,
                                  Argument<?>[] typeParameterArray,
                                  boolean isTypeVariable)
        Parameters:
        type - The type
        name - The name
        annotationMetadata - The annotation metadata
        typeParameters - The map of parameters
        typeParameterArray - The array of arguments
        isTypeVariable - Is the argument a type variable
      • DefaultArgument

        public DefaultArgument​(java.lang.reflect.Type type,
                               java.lang.String name,
                               AnnotationMetadata annotationMetadata)
        Parameters:
        type - The type
        name - The name
        annotationMetadata - The annotation metadata
    • Method Detail

      • isTypeVariable

        public boolean isTypeVariable()
        Description copied from interface: Argument
        Whether this argument is a type variable used in generics.
        Specified by:
        isTypeVariable in interface Argument<T>
        Returns:
        True if it is a variable
      • getTypeVariables

        public java.util.Map<java.lang.String,​Argument<?>> getTypeVariables()
        Specified by:
        getTypeVariables in interface TypeVariableResolver
        Returns:
        Obtain a map of the type parameters for the argument
      • getName

        @NonNull
        public java.lang.String getName()
        Specified by:
        getName in interface Argument<T>
        Specified by:
        getName in interface Named
        Returns:
        The name of the argument
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equalsType

        public boolean equalsType​(@Nullable
                                  Argument<?> o)
        Description copied from interface: Argument
        Whether the types are equivalent. The regular Object.equals(Object) implementation includes the argument name within the comparison so this method offers a variation that just compares types.
        Specified by:
        equalsType in interface Argument<T>
        Parameters:
        o - The type type
        Returns:
        True if they are equal
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • typeHashCode

        public int typeHashCode()
        Description copied from interface: Argument
        The hash code including only the types. The regular Object.hashCode() implementation includes the argument name within the comparison so this method offers a variation that just compares types.
        Specified by:
        typeHashCode in interface Argument<T>
        Returns:
        The type hash code
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object