public final class PluginServiceFactory<C> extends Object
<C> argument)
from a textual descriptor. This descriptor, which must be a resource loadable by this class'
classloader, is a plain text file which looks like
com.example.MyProjectLabelEnricher
!org.eclipse.jkube.maven.jkube.enhancer.DefaultProjectLabelEnricher
com.example.AnotherEnricher,50
If a line starts with ! it is removed if it has been added previously.
The optional second numeric value is the order in which the services are returned.| Constructor and Description |
|---|
PluginServiceFactory(C constructorParameter,
ClassLoader... loaders) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionalClassLoader(ClassLoader classLoader) |
<T> List<T> |
createServiceObjects(String... descriptorPaths)
Create a list of services ordered according to the ordering given in the
service descriptor files.
|
public PluginServiceFactory(C constructorParameter, ClassLoader... loaders)
public <T> List<T> createServiceObjects(String... descriptorPaths)
T - type of the service objects to createdescriptorPaths - a list of resource paths which are handle in the given order.
Normally, default service should be given as first parameter so that custom
descriptors have a chance to remove a default service.public void addAdditionalClassLoader(ClassLoader classLoader)
Copyright © 2024. All rights reserved.