T
- Service interfacepublic final class ServiceLoader<T> extends Object
ServiceLoader
.Constructor and Description |
---|
ServiceLoader(Class<? extends T> service,
Class<?>... argumentTypes) |
Modifier and Type | Method and Description |
---|---|
T |
create(String name,
Object... arguments)
Creates a defined service implementation.
|
Collection<T> |
createAll(Object... arguments)
Creates all registered service implementations.
|
List<T> |
createList(String list)
Creates service implementations from a comma separated list of names.
|
public T create(String name, Object... arguments)
The acronym for org.tinylog.writers.RollingFileWriter
is for example rolling file
.
name
- Acronym or class name of service implementationarguments
- Arguments for constructor of service implementationnull
if failed to create servicepublic List<T> createList(String list)
list
- Comma separated list of names with optional argumentspublic Collection<T> createAll(Object... arguments)
arguments
- Arguments for constructors of service implementationsCopyright © 2020. All rights reserved.