allow optional service loader result

This commit is contained in:
Jonathan Shook 2021-07-06 11:10:57 -05:00
parent 7e8fef5b5b
commit de26371496

View File

@ -48,6 +48,12 @@ public class SimpleServiceLoader<T> {
);
}
public Optional<T> getOptionally(String implName) {
Optional<T> type = get(implName);
return type;
}
/**
* Load the service providers which are annotated with {@link Service} and selector names.
*