- Java.util - WeakHashMap
- Java.util - Vector
- Java.util - UUID
- Java.util - TreeSet
- Java.util - TreeMap
- Java.util - TimeZone
- Java.util - TimerTask
- Java.util - Timer
- Java.util - StringTokenizer
- Java.util - Stack
- Java.util - SimpleTimeZone
- Java.util - ServiceLoader
- Java.util - Scanner
- Java.util - ResourceBundle.Control
- Java.util - ResourceBundle
- Java.util - Random
- Java.util - PropertyResourceBundle
- Java.util - PropertyPermission
- Java.util - Properties
- Java.util - PriorityQueue
- Java.util - Observable
- Java.util - Locale
- Java.util - ListResourceBundle
- Java.util - LinkedList
- Java.util - LinkedHashSet
- Java.util - LinkedHashMap
- Java.util - IdentityHashMap
- Java.util - Hashtable
- Java.util - HashSet
- Java.util - HashMap
- Java.util - GregorianCalendar
- Java.util - Formatter
- Java.util - EnumSet
- Java.util - EnumMap
- Java.util - Dictionary
- Java.util - Date
- Java.util - Currency
- Java.util - Collections
- Java.util - Calendar
- Java.util - BitSet
- Java.util - Arrays
- Java.util - ArrayList
- Java.util - ArrayDeque
- Java.util - Home
Java.util Package Extras
- Java.util - Discussion
- Java.util - Useful Resources
- Java.util - Enumerations
- Java.util - Exceptions
- Java.util - Interfaces
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Java.util.ServiceLoader Class
Introduction
The java.util.ServiceLoader class is a simple service-provider loading facipty.Following are the important points about ServiceLoader −
Service loaders always execute in the security context of the caller.Trusted system code should typically invoke the methods in this class, and the methods of the iterators which they return, from within a privileged security context.
This class Instances are not safe for use by multiple concurrent threads.
Class declaration
Following is the declaration for java.util.ServiceLoader class −
pubpc final class ServiceLoader<S> extends Object implements Iterable<S>
Parameters
Following is the parameter for java.util.ServiceLoader class −
S − This is the type of service to be loaded by this loader.
Class methods
Sr.No. | Method & Description |
---|---|
1 | This method loads the available providers of this loader s service. |
2 | This method creates a new service loader for the given service type, using the current thread s context class loader. |
3 | This method creates a new service loader for the given service type and class loader. |
4 | This method creates a new service loader for the given service type, using the extension class loader. |
5 | This method clear this loader s provider cache so that all providers will be reloaded. |
6 | This method returns a string describing this service. |
Methods inherited
This class inherits methods from the following classes −
java.util.Object