Class ClassLoaderUtils

java.lang.Object
io.hypersistence.utils.hibernate.util.ClassLoaderUtils

public final class ClassLoaderUtils extends Object
ClassLoaderUtils - Class loading related utilities holder.
Since:
2.1.0
Author:
Vlad Mihalcea
  • Method Details

    • getClassLoader

      public static ClassLoader getClassLoader()
      Load the available ClassLoader
      Returns:
      ClassLoader
    • loadClass

      public static <T> Class<T> loadClass(String className) throws ClassNotFoundException
      Load the Class denoted by the given string representation
      Type Parameters:
      T - class generic type
      Parameters:
      className - class string representation
      Returns:
      Class
      Throws:
      ClassNotFoundException - if the class cannot be resolved
    • findClass

      public static boolean findClass(String className)
      Find if Class denoted by the given string representation is loadable
      Parameters:
      className - class string representation
      Returns:
      Class
    • getResource

      public static URL getResource(String resourceName)
      Get the resource URL
      Parameters:
      resourceName - resource name
      Returns:
      resource URL
    • getResourceAsStream

      public static InputStream getResourceAsStream(String resourceName)
      Get the resource InputStream
      Parameters:
      resourceName - resource name
      Returns:
      resource InputStream