@Test public void testGetByType() { final ImageStrip result = tested.get(ImageStripTestInstance.class); assertEquals(strip, result); verify(stripInstances, times(1)).select(eq(ImageStripTestInstance.class)); }
public ImageStrip get(final String name) { return StreamSupport.stream(stripInstances.spliterator(), false) .filter(strip -> getName(strip).equals(name)) .findAny() .get(); }
ImageStripRegistry { public ImageStrip get(final String name) { return StreamSupport.stream(stripInstances.spliterator(), false) .filter(strip -> getName(strip).equals(name)) .findAny() .get(); } }
ImageStripRegistry { public ImageStrip get(final String name) { return StreamSupport.stream(stripInstances.spliterator(), false) .filter(strip -> getName(strip).equals(name)) .findAny() .get(); } protected  ImageStripRegistry(); @Inject  ImageStripRegistry(final @Any ManagedInstance<ImageStrip> stripInstances); }
ImageStripRegistry { public ImageStrip get(final String name) { return StreamSupport.stream(stripInstances.spliterator(), false) .filter(strip -> getName(strip).equals(name)) .findAny() .get(); } protected  ImageStripRegistry(); @Inject  ImageStripRegistry(final @Any ManagedInstance<ImageStrip> stripInstances); ImageStrip get(final String name); ImageStrip get(final Class<? extends ImageStrip> stripType); ImageStrip[] get(final Annotation... qualifiers); @PreDestroy void destroy(); @SuppressWarnings("unchecked") static String getName(final ImageStrip strip); static String getName(final Class<? extends ImageStrip> stripType); }
ImageStripRegistry { public ImageStrip get(final String name) { return StreamSupport.stream(stripInstances.spliterator(), false) .filter(strip -> getName(strip).equals(name)) .findAny() .get(); } protected  ImageStripRegistry(); @Inject  ImageStripRegistry(final @Any ManagedInstance<ImageStrip> stripInstances); ImageStrip get(final String name); ImageStrip get(final Class<? extends ImageStrip> stripType); ImageStrip[] get(final Annotation... qualifiers); @PreDestroy void destroy(); @SuppressWarnings("unchecked") static String getName(final ImageStrip strip); static String getName(final Class<? extends ImageStrip> stripType);  }