Package org.powermock.core.transformers
Interface MockTransformerChain
-
- All Known Implementing Classes:
DefaultMockTransformerChain
public interface MockTransformerChain
Interface represent chain ofMockTransformer
. Each transformer in chain instruments a class to enable one of mocking feature.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MockTransformerChain.FilterPredicate
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<MockTransformer>
filter(MockTransformerChain.FilterPredicate predicate)
Filter and return collection ofMockTransformer
which fit thepredicate
.<T> ClassWrapper<T>
transform(ClassWrapper<T> clazz)
Go thought all transformers in chain and instrument theclazz
.
-
-
-
Method Detail
-
transform
<T> ClassWrapper<T> transform(ClassWrapper<T> clazz) throws java.lang.Exception
Go thought all transformers in chain and instrument theclazz
.- Parameters:
clazz
- The class to be instrument to enabled class mocking.- Returns:
- A
ClassWrapper
representation of the instrumented class. - Throws:
java.lang.Exception
-
filter
java.util.Collection<MockTransformer> filter(MockTransformerChain.FilterPredicate predicate)
Filter and return collection ofMockTransformer
which fit thepredicate
.- Parameters:
predicate
- to test MockTransformer- Returns:
- collection of
MockTransformer
which fit theMockTransformerChain.FilterPredicate
-
-