Package org.apache.commons.jxpath.util

# Class ClassLoaderUtil

java.lang.Object
org.apache.commons.jxpath.util.ClassLoaderUtil

public final class ClassLoaderUtil extends Object
Port of class loading methods from `org.apache.commons.lang3.ClassUtils` from the Apache Commons Lang Component. Some adjustments made to remove dependency on `org.apache.commons.lang3.StringUtils`. Also modified to fall back on the current class loader when an attempt to load a class with the context class loader results in a `java.lang.ClassNotFoundException`. See org.apache.commons.lang3.ClassUtils

Since:
  1.4.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T> Class<T>`
  `getClass(String className, boolean initialize)`
  Gets the class represented by `className` using the current thread's context class loader.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getClass

    public static <T> Class<T> getClass(String className, boolean initialize) throws ClassNotFoundException
    Gets the class represented by `className` using the current thread's context class loader. This implementation supports names like "`java.lang.String[]`" as well as "`[Ljava.lang.String;`".
    Type Parameters:
      `T` - The expected class type.
    Parameters:
      `className` - the class name
      `initialize` - whether the class must be initialized
    Returns:
      the class represented by `className` using the current thread's context class loader
    Throws:
      `ClassNotFoundException` - if the class is not found