/** * Returns a new dependency that is not attached to an injection point. The returned dependency is * nullable. */ public static <T> Dependency<T> get(Key<T> key) { return new Dependency<T>(null, MoreTypes.canonicalizeKey(key), true, -1); }
@Override public <T> AnnotatedBindingBuilder<T> bind(Key<T> key) { BindingBuilder<T> builder = new BindingBuilder<T>(this, elements, getElementSource(), MoreTypes.canonicalizeKey(key)); return builder; }
private <T> AnnotatedElementBuilder exposeInternal(Key<T> key) { if (privateElements == null) { addError( "Cannot expose %s on a standard binder. " + "Exposed bindings are only applicable to private binders.", key); return new AnnotatedElementBuilder() { @Override public void annotatedWith(Class<? extends Annotation> annotationType) {} @Override public void annotatedWith(Annotation annotation) {} }; } ExposureBuilder<T> builder = new ExposureBuilder<T>(this, getElementSource(), MoreTypes.canonicalizeKey(key)); privateElements.addExposureBuilder(builder); return builder; }
key = MoreTypes.canonicalizeKey(key); // before storing the key long-term, canonicalize it. BindingImpl<T> binding = createJustInTimeBinding(key, errors, jitDisabled, jitType); state.parent().blacklist(key, state, binding.getSource());
/** * Returns a new dependency that is not attached to an injection point. The returned dependency is * nullable. */ public static <T> Dependency<T> get(Key<T> key) { return new Dependency<T>(null, MoreTypes.canonicalizeKey(key), true, -1); }
/** * Returns a new dependency that is not attached to an injection point. The returned dependency is * nullable. */ public static <T> Dependency<T> get(Key<T> key) { return new Dependency<T>(null, MoreTypes.canonicalizeKey(key), true, -1); }
/** * Returns a new dependency that is not attached to an injection point. The returned dependency is * nullable. */ public static <T> Dependency<T> get(Key<T> key) { return new Dependency<T>(null, MoreTypes.canonicalizeKey(key), true, -1); }
@Override public <T> AnnotatedBindingBuilder<T> bind(Key<T> key) { BindingBuilder<T> builder = new BindingBuilder<T>(this, elements, getElementSource(), MoreTypes.canonicalizeKey(key)); return builder; }
@Override public <T> AnnotatedBindingBuilder<T> bind(Key<T> key) { BindingBuilder<T> builder = new BindingBuilder<T>(this, elements, getElementSource(), MoreTypes.canonicalizeKey(key)); return builder; }
public <T> AnnotatedBindingBuilder<T> bind(Key<T> key) { return new BindingBuilder<T>(this, elements, getElementSource(), MoreTypes.canonicalizeKey(key)); }
private <T> AnnotatedElementBuilder exposeInternal(Key<T> key) { if (privateElements == null) { addError( "Cannot expose %s on a standard binder. " + "Exposed bindings are only applicable to private binders.", key); return new AnnotatedElementBuilder() { @Override public void annotatedWith(Class<? extends Annotation> annotationType) {} @Override public void annotatedWith(Annotation annotation) {} }; } ExposureBuilder<T> builder = new ExposureBuilder<T>(this, getElementSource(), MoreTypes.canonicalizeKey(key)); privateElements.addExposureBuilder(builder); return builder; }
private <T> AnnotatedElementBuilder exposeInternal(Key<T> key) { if (privateElements == null) { addError( "Cannot expose %s on a standard binder. " + "Exposed bindings are only applicable to private binders.", key); return new AnnotatedElementBuilder() { @Override public void annotatedWith(Class<? extends Annotation> annotationType) {} @Override public void annotatedWith(Annotation annotation) {} }; } ExposureBuilder<T> builder = new ExposureBuilder<T>(this, getElementSource(), MoreTypes.canonicalizeKey(key)); privateElements.addExposureBuilder(builder); return builder; }
private <T> AnnotatedElementBuilder exposeInternal(Key<T> key) { if (privateElements == null) { addError("Cannot expose %s on a standard binder. " + "Exposed bindings are only applicable to private binders.", key); return new AnnotatedElementBuilder() { @Override public void annotatedWith(Class<? extends Annotation> annotationType) { } @Override public void annotatedWith(Annotation annotation) { } }; } ExposureBuilder<T> builder = new ExposureBuilder<T>(this, getElementSource(), MoreTypes.canonicalizeKey(key)); privateElements.addExposureBuilder(builder); return builder; }
key = MoreTypes.canonicalizeKey(key); // before storing the key long-term, canonicalize it. BindingImpl<T> binding = createJustInTimeBinding(key, errors, jitDisabled, jitType); state.parent().blacklist(key, state, binding.getSource());
key = MoreTypes.canonicalizeKey(key); // before storing the key long-term, canonicalize it. BindingImpl<T> binding = createJustInTimeBinding(key, errors, jitDisabled, jitType); state.parent().blacklist(key, state, binding.getSource());
key = MoreTypes.canonicalizeKey(key); // before storing the key long-term, canonicalize it. BindingImpl<T> binding = createJustInTimeBinding(key, errors, jitDisabled, jitType); state.parent().blacklist(key, state, binding.getSource());