org.carrot2.util
Class ReflectionUtils

java.lang.Object
  extended by org.carrot2.util.ReflectionUtils

public final class ReflectionUtils
extends Object

Utilities related to Java reflection.


Method Summary
static Class<?> classForName(String clazzName)
          Load and initialize (or return, if already defined) a given class using context class loader.
static Class<?> classForName(String clazzName, boolean logWarning)
          Load and initialize (or return, if already defined) a given class using context class loader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

classForName

public static Class<?> classForName(String clazzName)
                             throws ClassNotFoundException
Load and initialize (or return, if already defined) a given class using context class loader. If class cannot be found, a ClassNotFoundException is thrown and logged.

Throws:
ClassNotFoundException

classForName

public static Class<?> classForName(String clazzName,
                                    boolean logWarning)
                             throws ClassNotFoundException
Load and initialize (or return, if already defined) a given class using context class loader.

Parameters:
clazzName - class name to load
logWarning - if true, a warning will be logged if class cannot be found
Throws:
ClassNotFoundException


Copyright (c) Dawid Weiss, Stanislaw Osinski