Class ReflectiveModuleSupplier

java.lang.Object
com.exonum.binding.core.runtime.ReflectiveModuleSupplier
All Implemented Interfaces:
java.util.function.Supplier<ServiceModule>

public final class ReflectiveModuleSupplier
extends java.lang.Object
implements java.util.function.Supplier<ServiceModule>
A reflective supplier of service modules that instantiates them with a no-arg constructor.
  • Constructor Summary

    Constructors 
    Constructor Description
    ReflectiveModuleSupplier​(java.lang.Class<? extends ServiceModule> moduleClass)
    Creates a module supplier for a given service module class.
  • Method Summary

    Modifier and Type Method Description
    ServiceModule get()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ReflectiveModuleSupplier

      public ReflectiveModuleSupplier​(java.lang.Class<? extends ServiceModule> moduleClass) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException
      Creates a module supplier for a given service module class.
      Throws:
      java.lang.NoSuchMethodException - if the constructor of given service module class does not exist
      java.lang.IllegalAccessException - if accessing the no-arg module constructor failed
  • Method Details

    • get

      public ServiceModule get()
      Specified by:
      get in interface java.util.function.Supplier<ServiceModule>
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object