Class TypeReflections

    • Method Detail

      • contains

        public boolean contains​(java.lang.Class<?> type)
        Indicates if the specified type is known to this TypeReflections set
        Parameters:
        type - The type to search for
        Returns:
        true if the type is present, false otherwise
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • forType

        public <T> TypeReflection<T> forType​(java.lang.Class<T> type)
                                      throws java.lang.IllegalArgumentException
        Returns the TypeReflection for the specified type, note the type must be part of this TypeReflections set
        Specified by:
        forType in interface TypeLocator
        Type Parameters:
        T - The type to search for
        Parameters:
        type - The type to lookup
        Returns:
        TypeReflection instance
        Throws:
        java.lang.IllegalArgumentException - if the type is not part of this type reflection set
      • get

        public <T> TypeReflection<T> get​(java.lang.Class<T> type)
                                  throws java.lang.IllegalArgumentException
        Synonym for forType(Class)
        Specified by:
        get in interface TypeLocator
        Type Parameters:
        T - The type to search for
        Parameters:
        type - The type to lookup
        Returns:
        TypeReflection instance
        Throws:
        java.lang.IllegalArgumentException - if the type is not part of this type reflection set
      • hashCode

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

        public boolean isIgnored​(TypeQualifier<?> service)
        Determines if the specified service type has been marked as ignored in this type set
        Parameters:
        service - The service to check
        Returns:
        true if the service is ignored, false otherwise
      • iterator

        public java.util.Iterator<TypeReflection<?>> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<TypeReflection<?>>
      • singletons

        public Instances singletons()
        Provides access to singleton fields annotated with Provides
        Returns:
        Instances instance which can be used to resolve singleton fields
      • toString

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

        public java.util.Set<java.lang.Class<?>> types()
        Enumerate the types in this TypeReflections set
        Returns:
        Set of Class instances
      • lookup

        public static java.lang.invoke.MethodHandles.Lookup lookup()
        Provide the MethodHandles.Lookup service used for reflective constructor invocation
        Returns:
        MethodHandles.Lookup instance