continue; } catch (InvalidBindingException e) { error("Graph validation failed: " + e.getMessage(), elements().getTypeElement(e.type)); continue; } catch (RuntimeException e) {
throw new InvalidBindingException(type.getName(), "has too many injectable constructors"); throw new InvalidBindingException(type.getName(), "has no injectable members. Do you want to add an injectable constructor?");
putBinding(scopedBinding); } catch (InvalidBindingException e) { addError(e.type + " " + e.getMessage() + " required by " + binding.requiredBy); bindings.put(key, Binding.UNRESOLVED); } catch (UnsupportedOperationException e) {
throw new InvalidBindingException(key, "is a generic class or an array and can only be bound with concrete type parameter(s) " + "in a @Provides method."); throw new InvalidBindingException(key, "is a @Qualifier-annotated type and must be bound by a @Provides method."); return binding; throw new InvalidBindingException(className, "could not be bound with key " + key);
protected Binding(String provideKey, String membersKey, boolean singleton, Object requiredBy) { if (singleton && provideKey == null) { throw new InvalidBindingException(Keys.getClassName(membersKey), "is exclusively members injected and therefore cannot be scoped"); } this.provideKey = provideKey; this.membersKey = membersKey; this.requiredBy = requiredBy; this.bits = (singleton ? SINGLETON : 0); }