src/main/java/javascalautils/concurrent/ReflectionUtil.java
@SuppressWarnings("unchecked")
    static <T> Try<T> newInstance(String className) {
        return Try(() -> (T) Class.forName(className).newInstance());
    }
@SuppressWarnings("unchecked")
    static <T> Try<T> newInstance(String className) {
        return Try(() -> (T) Class.forName(className).newInstance());
    }
@ SuppressWarnings ( "unchecked" ) static < T > Try < T > newInstance ( String className ) { return Try ( ( ) -> ( T ) Class . forName ( className ) . newInstance ( ) ) ; }
Attempts to create an instance of the provided class. <br>
This expects the class to be public and have a public (default) constructor with no arguments.

@param <T>
The expected to be returned by this method
@param className
The name of the class
@return The result, either {@link Success Success(T)} with the instance or {@link Failure Failure(Throwable)} in case of failure
@since 1.4
Attempts to create an instance of the provided class . <br > This expects the class to be public and have a public ( default ) constructor with no arguments .