-
public final class TransformerConfig.TransformerConfigScope
The TransformerConfig builder scope which provides utilities for creating a transformer config. The transformer scope can accept multiple InjectionTransformers and will create a proxy if more than one is collected.
-
-
Constructor Summary
Constructors Constructor Description TransformerConfig.TransformerConfigScope(List<ClassTransformer> cts, List<MethodTransformer> mts, List<FieldTransformer> fts)
Constructs a scope with the transformers provided, or none if not specified.
-
Method Summary
Modifier and Type Method Description final Boolean
add(ClassTransformer t)
Adds a ClassTransformer. final Boolean
add(MethodTransformer t)
Adds a MethodTransformer. final Boolean
add(FieldTransformer t)
Adds a FieldTransformer. final TransformerConfig.TransformerConfigScope
of(Function1<TransformerConfig.TransformerConfigScope, Unit> block)
Applies the given expression with 'this' as the scope. final TransformerConfig
build()
Constructs a TransformerConfig from the collected transformers. -
-
Constructor Detail
-
TransformerConfig.TransformerConfigScope
TransformerConfig.TransformerConfigScope(List<ClassTransformer> cts, List<MethodTransformer> mts, List<FieldTransformer> fts)
Constructs a scope with the transformers provided, or none if not specified.
-
-
Method Detail
-
add
final Boolean add(ClassTransformer t)
Adds a ClassTransformer.
- Parameters:
t
- the transformer to add.
-
add
final Boolean add(MethodTransformer t)
Adds a MethodTransformer.
- Parameters:
t
- the transformer to add.
-
add
final Boolean add(FieldTransformer t)
Adds a FieldTransformer.
- Parameters:
t
- the Transformer to add.
-
of
final TransformerConfig.TransformerConfigScope of(Function1<TransformerConfig.TransformerConfigScope, Unit> block)
Applies the given expression with 'this' as the scope.
- Parameters:
block
- the expression to evaluate.
-
build
final TransformerConfig build()
Constructs a TransformerConfig from the collected transformers. If more than one transformer is found a ProxiedTransformer will be created instead.
-
-
-
-