Package com.exonum.binding.core.runtime
Class ReflectiveModuleSupplier
- java.lang.Object
-
- com.exonum.binding.core.runtime.ReflectiveModuleSupplier
-
- All Implemented Interfaces:
Supplier<ServiceModule>
public final class ReflectiveModuleSupplier extends Object implements Supplier<ServiceModule>
A reflective supplier of service modules that instantiates them with a no-arg constructor.
-
-
Constructor Summary
Constructors Constructor Description ReflectiveModuleSupplier(Class<? extends ServiceModule> moduleClass)
Creates a module supplier for a given service module class.
-
-
-
Constructor Detail
-
ReflectiveModuleSupplier
public ReflectiveModuleSupplier(Class<? extends ServiceModule> moduleClass) throws NoSuchMethodException, IllegalAccessException
Creates a module supplier for a given service module class.- Throws:
NoSuchMethodException
- if the constructor of given service module class does not existIllegalAccessException
- if accessing the no-arg module constructor failed
-
-
Method Detail
-
get
public ServiceModule get()
- Specified by:
get
in interfaceSupplier<ServiceModule>
-
-