Class TypeDependencies<T>

  • Type Parameters:
    T - The type
    All Implemented Interfaces:
    java.lang.Iterable<TypeDependency>

    public class TypeDependencies<T>
    extends java.lang.Object
    implements java.lang.Iterable<TypeDependency>
    Captures the dependencies of a Class
    Since:
    19.3.0
    Author:
    cdivilly
    • Method Detail

      • equals

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

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

        public boolean isConcrete()
        Determines if the type can be instantiated.
        Returns:
        true if the type can be instantiated
      • isInstantiable

        public boolean isInstantiable()
        Determines if the type can be instantiated.
        Returns:
        true if the type can be instantiated
      • iterator

        public java.util.Iterator<TypeDependency> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • toString

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

        public java.lang.Class<T> type()
        The type
        Returns:
        Class instance
      • dependenciesSatisfied

        public boolean dependenciesSatisfied​(InstanceLocator locator)
        Resolves dependencies to determine if this type can be instantiated. Ideally this is called before newInstance(InstanceLocator) so that a TypeDependencyNotAvailableException is avoided. Note that this method may still throw an unchecked exception if a dependency is not satisfied.
        Parameters:
        locator -
        Returns: