| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final List | classLoaders
The additional class loaders to find classes in. |
| private static int | lastGoodRootIndex
When given a file name to form a class name, the file name is parsed and divided into segments. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| pack-priv static List | |
| private static void | |
| private static boolean | |
| private static Map | |
| public static Class | Returns: the class corresponding to the name specified.the class name. file)Returns the Class object corresponding to the given name. |
| public static XmlClass[] | Returns: - All theXmlClass objects that share the same <test> tag as the class.- The class to look for. cls, XmlSuite - The suite)XmlSuite whose <test> tags needs to be searched in.
|
| private static Collection | |
| public static List | Returns: the @FactorymethodsThe class to search for the @Factory annotation. cls, IAnnotationFinder The finder (JDK 1.4 or JDK 5.0+) use to search for the annotation. finder)For the given class, returns the method annotated with @Factory or null if none is found. |
| public static Class | |
| public static Set | |
| public static Set | |
| private static boolean | |
| private static boolean | |
| private static void |
| CLASS_HELPER | back to summary |
|---|---|
| private static final String CLASS_HELPER | |
| classLoaders | back to summary |
|---|---|
| private static final List<ClassLoader> classLoaders The additional class loaders to find classes in. | |
| lastGoodRootIndex | back to summary |
|---|---|
| private static int lastGoodRootIndex When given a file name to form a class name, the file name is parsed and divided into segments. For example, "c:/java/classes/com/foo/A.class" would be divided into 6 segments {"C:" "java", "classes", "com", "foo", "A"}. The first segment actually making up the class name is [3]. This value is saved in lastGoodRootIndex so that when we parse the next file name, we will try 3 right away. If 3 fails we will take the long approach. This is just a optimization cache value. | |
| ClassHelper | back to summary |
|---|---|
| private ClassHelper() Hide constructor. | |
| addClassLoader | back to summary |
|---|---|
| public static void addClassLoader(final ClassLoader loader) | |
| appendContextualClassLoaders | back to summary |
|---|---|
| pack-priv static List | |
| appendMethod | back to summary |
|---|---|
| private static void appendMethod(Map<String, Set<Method>> methods, Method declaredMethod) | |
| canInclude | back to summary |
|---|---|
| private static boolean canInclude(boolean isSamePackage, Method method, Map<String, Set<Method>> collected) | |
| extractMethods | back to summary |
|---|---|
| private static Map | |
| fileToClass | back to summary |
|---|---|
| public static Class Returns the Class object corresponding to the given name. The name may be of the following form:
| |
| findClassesInSameTest | back to summary |
|---|---|
| public static XmlClass[] findClassesInSameTest(Class<?> cls, XmlSuite suite) | |
| findClassesInSameTest | back to summary |
|---|---|
| private static Collection | |
| findDeclaredFactoryMethods | back to summary |
|---|---|
| public static List For the given class, returns the method annotated with @Factory or null if none is found. This method does not search up the superclass hierarchy. If more than one method is @Factory annotated, a TestNGException is thrown.
| |
| forName | back to summary |
|---|---|
| public static Class Tries to load the specified class using the context ClassLoader or if none, than from the default ClassLoader. This method differs from the standard class loading methods in that it does not throw an exception if the class is not found but returns null instead. | |
| getAvailableMethods | back to summary |
|---|---|
| public static Set | |
| getAvailableMethodsExcludingDefaults | back to summary |
|---|---|
| public static Set | |
| isOverridden | back to summary |
|---|---|
| private static boolean isOverridden(Method method, Map<String, Set<Method>> methodsByName) | |
| isSamePackage | back to summary |
|---|---|
| private static boolean isSamePackage(Package childPackage, Package classPackage) | |
| logClassNotFoundError | back to summary |
|---|---|
| private static void logClassNotFoundError(String className, Throwable ex) | |