Class ClassForNameResolver<T>

java.lang.Object
kieker.common.util.classpath.ClassForNameResolver<T>
Type Parameters:
T - the type that is used to cast a type that was found in the class path

public class ClassForNameResolver<T>
extends java.lang.Object
Since:
1.11
Author:
Christian Wulf
  • Constructor Summary

    Constructors 
    Constructor Description
    ClassForNameResolver​(java.lang.Class<T> classToCast)
    Create new class resolver.
  • Method Summary

    Modifier and Type Method Description
    java.lang.Class<? extends T> classForName​(java.lang.String classname)
    This method tries to find a class with the given name.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClassForNameResolver

      public ClassForNameResolver​(java.lang.Class<T> classToCast)
      Create new class resolver.
      Parameters:
      classToCast - class to cast
  • Method Details

    • classForName

      public final java.lang.Class<? extends T> classForName​(java.lang.String classname) throws java.lang.ClassNotFoundException
      This method tries to find a class with the given name.
      Parameters:
      classname - The name of the class.
      Returns:
      A Class instance corresponding to the given name, if it exists.
      Throws:
      java.lang.ClassNotFoundException - when the class is not known