Package 

Class BorgException.CircularDependencyException

  • All Implemented Interfaces:
    java.io.Serializable

    
    public final class BorgException.CircularDependencyException
    extends BorgException
                        

    Thrown when components form a dependency cycle.

    Why track the full cycle?

    • Helps developers visualize the dependency problem

    • Makes it clear which components need restructuring

    • Provides context for architectural decisions

    Example cycles:

    • DatabaseDrone -> RepositoryDrone -> ServiceDrone -> DatabaseDrone

    • ConfigDrone -> NetworkDrone -> ApiDrone -> ConfigDrone

    Common fixes:

    • Extract shared dependencies into a separate drone

    • Use dependency injection to break cycles

    • Refactor component responsibilities

    • Use lazy initialization where appropriate

    • Method Summary

      Modifier and Type Method Description
      final List<Class<?>> getCycle()
      Throwable getCause()
      String getMessage()
      • Methods inherited from class java.lang.Exception

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait