Package kieker.common.util.classpath
Class CachedClassForNameResolver<T>
java.lang.Object
kieker.common.util.classpath.CachedClassForNameResolver<T>
- Type Parameters:
T
- the type that is used to cast a type that was found in the class path
public class CachedClassForNameResolver<T>
extends java.lang.Object
- Since:
- 1.11
- Author:
- Christian Wulf
-
Constructor Summary
Constructors Constructor Description CachedClassForNameResolver(ClassForNameResolver<T> classForNameResolver)
Create a cached class name 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.
-
Constructor Details
-
CachedClassForNameResolver
Create a cached class name resolver.- Parameters:
classForNameResolver
- plain class name resolver
-
-
Method Details
-
classForName
public final java.lang.Class<? extends T> classForName(java.lang.String classname) throws java.lang.ClassNotFoundExceptionThis 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 specifiedclassname
does not refer to a known class
-