@Test public void addRequiredDependency_onSelf_shouldThrow() { try { Component.builder(TestClass.class).add(Dependency.required(TestClass.class)); fail("Expected exception not thrown."); } catch (IllegalArgumentException ex) { } }
public static <T> Component.Builder<T> builder(Class<T> anInterface) { return new Builder<>(anInterface); }
Component { public static <T> Component.Builder<T> builder(Class<T> anInterface) { return new Builder<>(anInterface); } }
Component { public static <T> Component.Builder<T> builder(Class<T> anInterface) { return new Builder<>(anInterface); } private  Component(
      Set<Class<? super T>> providedInterfaces,
      Set<Dependency> dependencies,
      @Instantiation int instantiation,
      @ComponentType int type,
      ComponentFactory<T> factory,
      Set<Class<?>> publishedEvents); }
Component { public static <T> Component.Builder<T> builder(Class<T> anInterface) { return new Builder<>(anInterface); } private  Component(
      Set<Class<? super T>> providedInterfaces,
      Set<Dependency> dependencies,
      @Instantiation int instantiation,
      @ComponentType int type,
      ComponentFactory<T> factory,
      Set<Class<?>> publishedEvents); Set<Class<? super T>> getProvidedInterfaces(); Set<Dependency> getDependencies(); ComponentFactory<T> getFactory(); Set<Class<?>> getPublishedEvents(); boolean isLazy(); boolean isAlwaysEager(); boolean isEagerInDefaultApp(); boolean isValue(); @Override String toString(); static Component.Builder<T> builder(Class<T> anInterface); @SafeVarargs static Component.Builder<T> builder(
      Class<T> anInterface, Class<? super T>... additionalInterfaces); @Deprecated static Component<T> of(Class<T> anInterface, T value); @SafeVarargs static Component<T> of(
      T value, Class<T> anInterface, Class<? super T>... additionalInterfaces); static Component.Builder<T> intoSetBuilder(Class<T> anInterface); static Component<T> intoSet(T value, Class<T> anInterface); }
Component { public static <T> Component.Builder<T> builder(Class<T> anInterface) { return new Builder<>(anInterface); } private  Component(
      Set<Class<? super T>> providedInterfaces,
      Set<Dependency> dependencies,
      @Instantiation int instantiation,
      @ComponentType int type,
      ComponentFactory<T> factory,
      Set<Class<?>> publishedEvents); Set<Class<? super T>> getProvidedInterfaces(); Set<Dependency> getDependencies(); ComponentFactory<T> getFactory(); Set<Class<?>> getPublishedEvents(); boolean isLazy(); boolean isAlwaysEager(); boolean isEagerInDefaultApp(); boolean isValue(); @Override String toString(); static Component.Builder<T> builder(Class<T> anInterface); @SafeVarargs static Component.Builder<T> builder(
      Class<T> anInterface, Class<? super T>... additionalInterfaces); @Deprecated static Component<T> of(Class<T> anInterface, T value); @SafeVarargs static Component<T> of(
      T value, Class<T> anInterface, Class<? super T>... additionalInterfaces); static Component.Builder<T> intoSetBuilder(Class<T> anInterface); static Component<T> intoSet(T value, Class<T> anInterface);  }