Package org.powermock.tests.utils.impl
Class PrepareForTestExtractorImpl
java.lang.Object
org.powermock.tests.utils.impl.AbstractTestClassExtractor
org.powermock.tests.utils.impl.PrepareForTestExtractorImpl
- All Implemented Interfaces:
TestClassesExtractor
Implementation of the
TestClassesExtractor
interface that extract
classes from the PrepareForTest
or PrepareOnlyThisForTest
annotations. It also adds the test case to the array of classes that should
be modified.-
Field Summary
Fields inherited from class org.powermock.tests.utils.impl.AbstractTestClassExtractor
includeMethods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addClassHierarchy
(Set<String> all, Class<?> classToMock) private void
addFullyQualifiedNames
(Set<String> all, String[] fullyQualifiedNames) private void
addFullyQualifiedNames
(Set<String> all, PrepareForTest annotation) private void
addFullyQualifiedNames
(Set<String> all, PrepareOnlyThisForTest annotation) private void
addInnerClassesAndInterfaces
(Set<String> all, Class<?> classToMock) private void
addTestCase
(Set<String> all, AnnotatedElement element) protected String[]
getClassesToModify
(AnnotatedElement element) Get the fully qualified names for classes that must should be modified for thiselement
.Methods inherited from class org.powermock.tests.utils.impl.AbstractTestClassExtractor
getTestClasses, isPrepared
-
Constructor Details
-
PrepareForTestExtractorImpl
public PrepareForTestExtractorImpl() -
PrepareForTestExtractorImpl
public PrepareForTestExtractorImpl(boolean includeMethods)
-
-
Method Details
-
getClassesToModify
Get the fully qualified names for classes that must should be modified for thiselement
.- Specified by:
getClassesToModify
in classAbstractTestClassExtractor
- Parameters:
element
- The element that may contain info regarding which classes that must be modified by PowerMock.- Returns:
- An array of fully-qualified names to classes that must be
modified by PowerMock for the specific
element
.
-
addTestCase
-
addFullyQualifiedNames
-
addFullyQualifiedNames
-
addFullyQualifiedNames
-
addClassHierarchy
-
addInnerClassesAndInterfaces
-