Class ClassCreatorUtils

java.lang.Object
io.github.blyznytsiaorg.bibernate.utils.ClassCreatorUtils

public class ClassCreatorUtils extends Object
Utility class for creating new instances of classes using reflection.
Since:
1.0
Author:
Blyzhnytsia Team
  • Constructor Details

    • ClassCreatorUtils

      public ClassCreatorUtils()
  • Method Details

    • createNewInstance

      public static <T> T createNewInstance(Class<?> aClass, String errorMessage)
      Creates a new instance of the specified class using reflection.
      Type Parameters:
      T - The type of the class to be instantiated.
      Parameters:
      aClass - The class to instantiate.
      errorMessage - The error message to be used if the instantiation fails.
      Returns:
      A new instance of the specified class.
      Throws:
      ClassLimitationCreationException - If there is an issue creating the class instance.