Skip to content

Commit

Permalink
injector: Add option to keep old implementation when introducing new imp
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyknic committed Jan 10, 2017
1 parent 727e838 commit 705fd2e
Show file tree
Hide file tree
Showing 3 changed files with 269 additions and 131 deletions.
Expand Up @@ -21,7 +21,6 @@
import com.speedment.common.injector.annotation.Inject;
import com.speedment.common.injector.exception.NoDefaultConstructorException;
import com.speedment.common.injector.internal.InjectorImpl;

import java.nio.file.Path;
import java.util.Optional;
import java.util.stream.Stream;
Expand All @@ -39,6 +38,16 @@
* @see ExecuteBefore
*/
public interface Injector {

/**
* Returns a stream of all the instances associated with the specified class
* signature.
*
* @param <T> the class signature of the injectable type
* @param type the expected type
* @return the automatically resolved instances
*/
<T> Stream<T> stream(Class<T> type);

/**
* Returns the instance associated with the specified class signature.
Expand Down

0 comments on commit 705fd2e

Please sign in to comment.