@ Override public void onCreate ( ) { super . onCreate ( ) ; graphMonitor = new Graph . Monitor ( ) { @ Override public void onInject ( Object target ) { if ( controller != null && target == MvcService . this ) { controller . view = MvcService . this ; } } @ Override public void onRelease ( Object target ) { } } ; Mvc . graph ( ) . registerMonitor ( graphMonitor ) ; if ( getControllerClass ( ) != null ) { try { controller = Mvc . graph ( ) . reference ( getControllerClass ( ) , null ) ; } catch ( CircularDependenciesException e ) { e . printStackTrace ( ) ; } catch ( ProvideException e ) { e . printStackTrace ( ) ; } catch ( ProviderMissingException e ) { throw new IllegalStateException ( "Unable to inject " + getControllerClass ( ) . getName ( ) + ".\n" + e . getMessage ( ) , e ) ; } } Mvc . graph ( ) . inject ( this ) ; eventRegister = new EventRegister ( this ) ; eventRegister . registerEventBuses ( ) ; }
Callback of creating a service