Class ClassUtil

    • Method Detail

      • createInstance

        public static Object createInstance​(String className)
                                     throws CfgException
        Given a valid class name call the default constructor through reflexion and return the reference to the caller.
        Parameters:
        className - contains fully qualified java class name to be instantiated. Must have a public default constructor to be successful.
        Returns:
        reference to instantiated ManagerImpl object.
        Throws:
        CfgException - in the event of failure to instantiate.
      • resourceAsStream

        public static InputStream resourceAsStream​(String name)
                                            throws CfgException
        Find a file on the classloader and return as InputStream.
        Parameters:
        name - contains the name of the file resource.
        Returns:
        handle to the InputStream
        Throws:
        CfgException - in the event resource is not found on classloader.