Java 类com.google.inject.binder.AnnotatedElementBuilder 实例源码

项目:guice    文件:Elements.java   
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;
}
项目:guice-old    文件:Elements.java   
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() {
      public void annotatedWith(Class<? extends Annotation> annotationType) {}
      public void annotatedWith(Annotation annotation) {}
    };
  }

  ExposureBuilder<T> builder = new ExposureBuilder<T>(this, getElementSource(), key);
  privateElements.addExposureBuilder(builder);
  return builder;
}
项目:google-guice    文件:Elements.java   
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() {
      public void annotatedWith(Class<? extends Annotation> annotationType) {}
      public void annotatedWith(Annotation annotation) {}
    };
  }

  ExposureBuilder<T> builder = new ExposureBuilder<T>(this, getSource(), key);
  privateElements.addExposureBuilder(builder);
  return builder;
}
项目:violet    文件:BindAndExposeBindingBuilder.java   
BindAndExposeBindingBuilder(final AnnotatedBindingBuilder<T> bind, final AnnotatedElementBuilder expose) {
  this.bind = bind;
  this.expose = expose;
}
项目:violet    文件:ForwardingPrivateBinder.java   
@Override
default AnnotatedElementBuilder expose(final Class<?> type) {
  return this.binder().expose(type);
}
项目:violet    文件:ForwardingPrivateBinder.java   
@Override
default AnnotatedElementBuilder expose(final TypeLiteral<?> type) {
  return this.binder().expose(type);
}
项目:google-gin    文件:AnnotatedElementBuilderAdapter.java   
AnnotatedElementBuilderAdapter(AnnotatedElementBuilder builder) {
  this.guiceBuilder = builder;
}
项目:guice    文件:Elements.java   
@Override
public AnnotatedElementBuilder expose(Class<?> type) {
  return exposeInternal(Key.get(type));
}
项目:guice    文件:Elements.java   
@Override
public AnnotatedElementBuilder expose(TypeLiteral<?> type) {
  return exposeInternal(Key.get(type));
}
项目:guice-old    文件:Elements.java   
public AnnotatedElementBuilder expose(Class<?> type) {
  return exposeInternal(Key.get(type));
}
项目:guice-old    文件:Elements.java   
public AnnotatedElementBuilder expose(TypeLiteral<?> type) {
  return exposeInternal(Key.get(type));
}
项目:google-guice    文件:Elements.java   
public AnnotatedElementBuilder expose(Class<?> type) {
  return exposeInternal(Key.get(type));
}
项目:google-guice    文件:Elements.java   
public AnnotatedElementBuilder expose(TypeLiteral<?> type) {
  return exposeInternal(Key.get(type));
}
项目:guice    文件:PrivateModule.java   
/**
 * Makes a binding for {@code type} available to other modules and the injector. Use {@link
 * AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
 * binding annotation.
 */
protected final AnnotatedElementBuilder expose(Class<?> type) {
  return binder().expose(type);
}
项目:guice    文件:PrivateModule.java   
/**
 * Makes a binding for {@code type} available to other modules and the injector. Use {@link
 * AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
 * binding annotation.
 */
protected final AnnotatedElementBuilder expose(TypeLiteral<?> type) {
  return binder().expose(type);
}
项目:guice    文件:PrivateBinder.java   
/**
 * Makes a binding for {@code type} available to the enclosing environment. Use {@link
 * com.google.inject.binder.AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to
 * expose {@code type} with a binding annotation.
 */
AnnotatedElementBuilder expose(Class<?> type);
项目:guice    文件:PrivateBinder.java   
/**
 * Makes a binding for {@code type} available to the enclosing environment. Use {@link
 * AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
 * binding annotation.
 */
AnnotatedElementBuilder expose(TypeLiteral<?> type);
项目:guice-old    文件:PrivateModule.java   
/**
 * Makes a binding for {@code type} available to other modules and the injector. Use {@link
 * AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
 * binding annotation.
 */
protected final AnnotatedElementBuilder expose(Class<?> type) {
  return binder().expose(type);
}
项目:guice-old    文件:PrivateModule.java   
/**
 * Makes a binding for {@code type} available to other modules and the injector. Use {@link
 * AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
 * binding annotation.
 */
protected final AnnotatedElementBuilder expose(TypeLiteral<?> type) {
  return binder().expose(type);
}
项目:guice-old    文件:PrivateBinder.java   
/**
 * Makes a binding for {@code type} available to the enclosing environment. Use {@link
 * com.google.inject.binder.AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
 * binding annotation.
 */
AnnotatedElementBuilder expose(Class<?> type);
项目:guice-old    文件:PrivateBinder.java   
/**
 * Makes a binding for {@code type} available to the enclosing environment. Use {@link
 * AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
 * binding annotation.
 */
AnnotatedElementBuilder expose(TypeLiteral<?> type);
项目:google-guice    文件:PrivateModule.java   
/**
 * Makes a binding for {@code type} available to other modules and the injector. Use {@link
 * AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
 * binding annotation.
 */
protected final AnnotatedElementBuilder expose(Class<?> type) {
  return binder().expose(type);
}
项目:google-guice    文件:PrivateModule.java   
/**
 * Makes a binding for {@code type} available to other modules and the injector. Use {@link
 * AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
 * binding annotation.
 */
protected final AnnotatedElementBuilder expose(TypeLiteral<?> type) {
  return binder().expose(type);
}
项目:google-guice    文件:PrivateBinder.java   
/**
 * Makes a binding for {@code type} available to the enclosing environment. Use {@link
 * com.google.inject.binder.AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
 * binding annotation.
 */
AnnotatedElementBuilder expose(Class<?> type);
项目:google-guice    文件:PrivateBinder.java   
/**
 * Makes a binding for {@code type} available to the enclosing environment. Use {@link
 * AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
 * binding annotation.
 */
AnnotatedElementBuilder expose(TypeLiteral<?> type);