public final class InventoryFactory extends Object
Inventory by locating it using java services.
This class is just for convenience. You can easily do without it using the ServiceLoader
mechanisms.
| Constructor and Description |
|---|
InventoryFactory() |
| Modifier and Type | Method and Description |
|---|---|
Inventory |
newInstance()
Uses the current thread's context classloader to locate the instance.
|
Inventory |
newInstance(ClassLoader classLoader)
Instantiates new
Inventory by locating its service specification in the provided classloader. |
public Inventory newInstance()
newInstance(ClassLoader)public Inventory newInstance(ClassLoader classLoader)
Inventory by locating its service specification in the provided classloader.classLoader - the classloader to useServiceLoader.load(Class, ClassLoader)Copyright © 2015 Red Hat, Inc.. All rights reserved.