-
public final class ServiceRegistrationReflection<T extends Object> extends ServiceRegistration<T>
A registration of a service that should use reflection to instantiate the service. This implementation takes as input clazz and using reflection will determine the best constructor to use for creating a new instance of that clazz.
The constructor can have parameters, as long as the parameter types are:
A service that can be resolved via IServiceProvider.getService.
A generic list of a service that can be resolved via IServiceProvider.getAllServices.
The instantiated service is treated as a singleton, instantiation will only happen once.
-
-
Constructor Summary
Constructors Constructor Description ServiceRegistrationReflection(Class<?> clazz)
-
Method Summary
Modifier and Type Method Description final Set<Class<?>>getServices()Objectresolve(IServiceProvider provider)-
-
Constructor Detail
-
ServiceRegistrationReflection
ServiceRegistrationReflection(Class<?> clazz)
-
-
Method Detail
-
getServices
final Set<Class<?>> getServices()
-
resolve
Object resolve(IServiceProvider provider)
-
-
-
-