Package cz.o2.proxima.core.util
Class Classpath
- java.lang.Object
-
- cz.o2.proxima.core.util.Classpath
-
@Internal public class Classpath extends java.lang.Object
Classpath related utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.lang.Class<? extends T>
findClass(java.lang.String name, java.lang.Class<T> superClass)
Find given class.static <T> T
newInstance(java.lang.Class<T> cls)
Create new instance of given classstatic <T> T
newInstance(java.lang.String name, java.lang.Class<T> superClass)
Create new instance of given class
-
-
-
Method Detail
-
findClass
public static <T> java.lang.Class<? extends T> findClass(java.lang.String name, java.lang.Class<T> superClass)
Find given class. Try hard to find it replacing `.' by `$' if appropriate.- Type Parameters:
T
- type of the superclass- Parameters:
name
- class name to search forsuperClass
- class or interface the found class should extend- Returns:
- class object of the found class
-
newInstance
public static <T> T newInstance(java.lang.Class<T> cls)
Create new instance of given class- Type Parameters:
T
- type of the superclass- Parameters:
cls
- name of class- Returns:
- instance of requested class
-
newInstance
public static <T> T newInstance(java.lang.String name, java.lang.Class<T> superClass)
Create new instance of given class- Type Parameters:
T
- type of the superclass- Parameters:
name
- name of classsuperClass
- class or interface the found class should extend- Returns:
- instance of requested class
-
-