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. -
Method Summary
Modifier and Type Method Description ServiceModule
get()
String
toString()
-
Constructor Details
-
ReflectiveModuleSupplier
public ReflectiveModuleSupplier(Class<? extends ServiceModule> moduleClass) throws NoSuchMethodException, IllegalAccessExceptionCreates 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 Details