Interface TransformerRegistry
- All Known Implementing Classes:
DefaultTransformerRegistry
public interface TransformerRegistry
A registry to register class transformers to. Each registered transformer is only called once.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidregisterTransformer(@NonNull String packagePrefix, @NonNull String classname, @NonNull Transformer transformer) Registers a transformer for a class with the given package prefix and the given class name (both case-sensitive).voidregisterTransformer(@NonNull Predicate<String> filter, @NonNull Transformer transformer) Registers a transformer for a class which matches the given filter.
-
Method Details
-
registerTransformer
void registerTransformer(@NonNull @NonNull String packagePrefix, @NonNull @NonNull String classname, @NonNull @NonNull Transformer transformer) Registers a transformer for a class with the given package prefix and the given class name (both case-sensitive).- Parameters:
packagePrefix- the prefix of the package the class to transform is in.classname- the name of the class to transform.transformer- the transformer to apply to the class.- Throws:
NullPointerException- if the given package prefix, class name or transformer is null.
-
registerTransformer
void registerTransformer(@NonNull @NonNull Predicate<String> filter, @NonNull @NonNull Transformer transformer) Registers a transformer for a class which matches the given filter.- Parameters:
filter- the filter for the class name of the class to transform.transformer- the transformer to apply to the class.- Throws:
NullPointerException- if the given filter or transformer is null.
-