T
- Service interfacepublic final class ServiceLoader<T>
extends java.lang.Object
ServiceLoader
.Constructor | Description |
---|---|
ServiceLoader(java.lang.Class<? extends T> service,
java.lang.Class<?>... argumentTypes) |
Modifier and Type | Method | Description |
---|---|---|
T |
create(java.lang.String name,
java.lang.Object... arguments) |
Creates a defined service implementation.
|
java.util.Collection<T> |
createAll(java.lang.Object... arguments) |
Creates all registered service implementations.
|
public ServiceLoader(java.lang.Class<? extends T> service, java.lang.Class<?>... argumentTypes)
service
- Service interfaceargumentTypes
- Expected argument types for constructorspublic T create(java.lang.String name, java.lang.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 java.util.Collection<T> createAll(java.lang.Object... arguments)
arguments
- Arguments for constructors of service implementationsCopyright © 2019. All rights reserved.