com.vladmihalcea.hibernate.type.util
Class ClassLoaderUtils

java.lang.Object
  extended by com.vladmihalcea.hibernate.type.util.ClassLoaderUtils

public final class ClassLoaderUtils
extends Object

ClassLoaderUtils - Class loading related utilities holder.

Since:
2.1.0
Author:
Vlad Mihalcea

Method Summary
static boolean findClass(String className)
          Find if Class denoted by the given string representation is loadable
static ClassLoader getClassLoader()
          Load the available ClassLoader
static URL getResource(String resourceName)
          Get the resource URL
static InputStream getResourceAsStream(String resourceName)
          Get the resource InputStream
static
<T> Class<T>
loadClass(String className)
          Load the Class denoted by the given string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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


Copyright © 2020. All rights reserved.