Class Instantiator

java.lang.Object
io.debezium.config.Instantiator

public class Instantiator extends Object
Instantiates given classes reflectively.
Author:
Jiri Pechanec
  • Constructor Details

    • Instantiator

      public Instantiator()
  • Method Details

    • getInstance

      public static <T> T getInstance(String className)
      Instantiates the specified class either using the no-args constructor.
      Returns:
      The newly created instance or null if no class name was given
    • getInstance

      public static <T> T getInstance(String className, Configuration configuration)
      Instantiates the specified class either using the no-args constructor or the constructor with a single parameter of type Configuration, if a configuration object is passed.
      Returns:
      The newly created instance or null if no class name was given
    • getInstanceWithProperties

      public static <T> T getInstanceWithProperties(String className, Properties prop)
      Instantiates the specified class either using the no-args constructor or the constructor with a single parameter of type Properties, if a properties object is passed.
      Returns:
      The newly created instance or null if no class name was given
    • getInstanceWithProvidedConstructorType

      public static <T, C> T getInstanceWithProvidedConstructorType(String className, Class<C> constructorType, C constructorValue)