org.powermock.tests.utils.impl
Class MockPolicyInitializerImpl
java.lang.Object
org.powermock.tests.utils.impl.MockPolicyInitializerImpl
- All Implemented Interfaces:
- MockPolicyInitializer
public class MockPolicyInitializerImpl
- extends java.lang.Object
- implements MockPolicyInitializer
The default implementation of the MockPolicyInitializer interface for
mock policies.
|
Method Summary |
void |
initialize(java.lang.ClassLoader classLoader)
Initializes the mock policies for a given class loader. |
boolean |
isPrepared(java.lang.String fullyQualifiedClassName)
|
boolean |
needsInitialization()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockPolicyInitializerImpl
public MockPolicyInitializerImpl(java.lang.Class<? extends PowerMockPolicy>[] mockPolicies)
MockPolicyInitializerImpl
public MockPolicyInitializerImpl(java.lang.Class<?> testClass)
isPrepared
public boolean isPrepared(java.lang.String fullyQualifiedClassName)
- Specified by:
isPrepared in interface MockPolicyInitializer
- Returns:
true if the class with the fully-qualified name of
fullyQualifiedClassName was prepared for testing by
this mock policy initializer.
needsInitialization
public boolean needsInitialization()
- Specified by:
needsInitialization in interface MockPolicyInitializer
- Returns:
true if a client needs to perform initialization for
this MockPolicyInitializer, false otherwise.
initialize
public void initialize(java.lang.ClassLoader classLoader)
- Initializes the mock policies for a given class loader. Note that this
method must not be called from the class loader (
classLoader) that you pass in to this method.
Note that if the class-loader is not an instance of
MockClassLoader this method will return silently.
- Specified by:
initialize in interface MockPolicyInitializer