Class CyclicDependencyException

  • All Implemented Interfaces:
    java.io.Serializable

    public class CyclicDependencyException
    extends DependencyException
    Thrown when a type or a group of types which are being registered has a dependency which directly or indirectly refers to the type containing the dependency, otherwise known as a cyclical dependency.

    If the cyclical dependency cannot be resolved (by means of proxies for example) the injector can throw this exception to indicate the types involved. If this exception is thrown, the problem can be solved by the user by breaking the cyclical dependency or by using a provider for one of the dependencies in the cycle.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CyclicDependencyException​(java.lang.String message)
      Constructs a new instance.
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CyclicDependencyException

        public CyclicDependencyException​(java.lang.String message)
        Constructs a new instance.
        Parameters:
        message - a message, cannot be null