Top Constructors Methods
org.apache.avro.util

public Class ClassUtils

extends Object
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Class<?>

Returns:

The class or null if no class loader could load the class.
forName
(String
The name of the class to load.
className
)

Loads a class using the class loader.

public static Class<?>

Returns:

The class or null if no class loader could load the class.
forName
(Class<?>
The name of a context class to use.
contextClass
,
String
The name of the class to load
className
)

Loads a class using the class loader.

public static Class<?>

Returns:

The class or null if no class loader could load the class.
forName
(ClassLoader
The classloader to use.
classLoader
,
String
The name of the class to load
className
)

Loads a class using the class loader.

private static Class<?>
forName(String className, ClassLoader classLoader)

Loads a Class from the specified ClassLoader without throwing ClassNotFoundException.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ClassUtilsback to summary
private ClassUtils()

Method Detail

forNameback to summary
public static Class<?> forName(String className) throws ClassNotFoundException

Loads a class using the class loader. 1. The class loader of the current class is being used. 2. The thread context class loader is being used. If both approaches fail, returns null.

Parameters
className:String

The name of the class to load.

Returns:Class<?>

The class or null if no class loader could load the class.

forNameback to summary
public static Class<?> forName(Class<?> contextClass, String className) throws ClassNotFoundException

Loads a class using the class loader. 1. The class loader of the context class is being used. 2. The thread context class loader is being used. If both approaches fail, returns null.

Parameters
contextClass:Class<?>

The name of a context class to use.

className:String

The name of the class to load

Returns:Class<?>

The class or null if no class loader could load the class.

forNameback to summary
public static Class<?> forName(ClassLoader classLoader, String className) throws ClassNotFoundException

Loads a class using the class loader. 1. The class loader of the context class is being used. 2. The thread context class loader is being used. If both approaches fail, returns null.

Parameters
classLoader:ClassLoader

The classloader to use.

className:String

The name of the class to load

Returns:Class<?>

The class or null if no class loader could load the class.

forNameback to summary
private static Class<?> forName(String className, ClassLoader classLoader)

Loads a Class from the specified ClassLoader without throwing ClassNotFoundException.