@HashCodeAndEqualsPlugin.Enhance public static class Transformer.ForField extends Object implements Transformer<FieldDescription>
FieldDescription.Token
.Modifier and Type | Class and Description |
---|---|
protected static class |
Transformer.ForField.FieldModifierTransformer
A transformer for a field's modifiers.
|
protected static class |
Transformer.ForField.TransformedField
An implementation of a transformed field.
|
Transformer.Compound<S>, Transformer.ForField, Transformer.ForMethod, Transformer.NoOp
Constructor and Description |
---|
ForField(Transformer<FieldDescription.Token> transformer)
Creates a new simple field transformer.
|
Modifier and Type | Method and Description |
---|---|
FieldDescription |
transform(TypeDescription instrumentedType,
FieldDescription fieldDescription)
Transforms the supplied target.
|
static Transformer<FieldDescription> |
withModifiers(List<? extends ModifierContributor.ForField> modifierContributors)
Creates a field transformer that patches the transformed field by the given modifier contributors.
|
static Transformer<FieldDescription> |
withModifiers(ModifierContributor.ForField... modifierContributor)
Creates a field transformer that patches the transformed field by the given modifier contributors.
|
public ForField(Transformer<FieldDescription.Token> transformer)
transformer
- The token transformer to apply to a transformed field.public static Transformer<FieldDescription> withModifiers(ModifierContributor.ForField... modifierContributor)
modifierContributor
- The modifier contributors to apply.public static Transformer<FieldDescription> withModifiers(List<? extends ModifierContributor.ForField> modifierContributors)
modifierContributors
- The modifier contributors to apply.public FieldDescription transform(TypeDescription instrumentedType, FieldDescription fieldDescription)
transform
in interface Transformer<FieldDescription>
instrumentedType
- The instrumented type that declares the target being transformed.fieldDescription
- The target entity that is being transformed.Copyright © 2014–2020. All rights reserved.