public final class ClassHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addClassLoader(ClassLoader loader) |
static Class<?> |
fileToClass(String file)
Returns the Class object corresponding to the given name.
|
static XmlClass[] |
findClassesInSameTest(Class<?> cls,
XmlSuite suite) |
static List<ConstructorOrMethod> |
findDeclaredFactoryMethods(Class<?> cls,
IAnnotationFinder finder)
For the given class, returns the method annotated with @Factory or null if none is found.
|
static Class<?> |
forName(String className)
Tries to load the specified class using the context ClassLoader or if none, than from the
default ClassLoader.
|
static Set<Method> |
getAvailableMethods(Class<?> clazz) |
static Set<Method> |
getAvailableMethodsExcludingDefaults(Class<?> clazz) |
public static void addClassLoader(ClassLoader loader)
public static Class<?> forName(String className)
className - the class name to be loaded.public static List<ConstructorOrMethod> findDeclaredFactoryMethods(Class<?> cls, IAnnotationFinder finder)
cls - The class to search for the @Factory annotation.finder - The finder (JDK 1.4 or JDK 5.0+) use to search for the annotation.methodspublic static Set<Method> getAvailableMethodsExcludingDefaults(Class<?> clazz)
public static Class<?> fileToClass(String file)
file - the class name.Copyright © 2025. All rights reserved.