Class ClassCreatorUtils
java.lang.Object
io.github.blyznytsiaorg.bibernate.utils.ClassCreatorUtils
Utility class for creating new instances of classes using reflection.
- Since:
- 1.0
- Author:
- Blyzhnytsia Team
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
createNewInstance
(Class<?> aClass, String errorMessage) Creates a new instance of the specified class using reflection.
-
Constructor Details
-
ClassCreatorUtils
public ClassCreatorUtils()
-
-
Method Details
-
createNewInstance
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.
-