private boolean isExcludedBinding ( Key < ? > key ) { Class < ? > rawType = key . getTypeLiteral ( ) . getRawType ( ) ; for ( Class < ? > excludedClass : excludedBindings ) { if ( excludedClass . isAssignableFrom ( rawType ) ) { return true ; } } return false ; }
This is to prevent circular dependency during binding resolution in the provider . As we loop through every binding in the injector we need to exclude certain bindings as they havent been created yet .