Java ServiceLoader Class methods, constructors, variables available in Java 8 release are listed below. We will publish example program on each methods ASAP.
Methods in Java ServiceLoader Class
S.No | Method & Description |
---|---|
1 | Iterator<S> iterator()
Lazily loads the available providers of this loader’s service.
|
2 | static <S> ServiceLoader<S> load(Class<S> service)
Creates a new service loader for the given service type, using the current thread’s context class loader.
|
3 | static <S> ServiceLoader<S> load(Class<S> service, ClassLoader loader)
Creates a new service loader for the given service type and class loader.
|
4 | static <S> ServiceLoader<S> loadInstalled(Class<S> service) Creates a new service loader for the given service type, using the extension class loader.
|
5 | void reload()
Clear this loader’s provider cache so that all providers will be reloaded.
|
6 | String toString()
Returns a string describing this service.
|
Ask your questions in eHowToNow Forum
Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers
- java.util.concurrent.locks Package
- Java – ListResourceBundle Class
- Java – AbstractMap.SimpleEntry Class
- Java – PropertyPermission Class
- Java – Scanner Class
- Java – Properties Class
- Java – BiConsumer Interface
- Java – AbstractSequentialList Class
- Java – Stream Interface
- Java ArrayList toArray() method with example
- Java ArrayList clear() method with example
- Java – PropertyResourceBundle Class
- Java ArrayList listIterator() method with example
- Java – Currency Class
- Java – LongAccumulator Class
Leave a Reply
You must be logged in to post a comment.