Class CyclicBeanException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.bobocode.bring.core.exception.CyclicBeanException
All Implemented Interfaces:
Serializable

public class CyclicBeanException extends RuntimeException
Exception thrown to indicate the presence of cyclic dependencies between beans within a Bring Dependency Injection framework. This exception provides information about the classes involved in the cyclic dependency.
Since:
1.0
Author:
Blyzhnytsia Team
See Also:
  • Field Details

  • Constructor Details

    • CyclicBeanException

      public CyclicBeanException(Set<String> classes)
      Constructs a new CyclicBeanException with a message indicating the classes involved in the cyclic dependency.
      Parameters:
      classes - Set of class names involved in the cyclic dependency
  • Method Details

    • printCyclic

      private static String printCyclic(Set<String> classes)
      Generates a formatted string representation of the cyclic dependency involving classes.
      Parameters:
      classes - Set of class names involved in the cyclic dependency
      Returns:
      A string representation of the cyclic dependency path among classes