@HashCodeAndEqualsPlugin.Enhance protected static class FieldRegistry.Default.Entry extends java.lang.Object implements LatentMatcher<FieldDescription>
LatentMatcher.Conjunction<S>, LatentMatcher.Disjunction<S>, LatentMatcher.ForFieldToken, LatentMatcher.ForMethodToken, LatentMatcher.ForSelfDeclaredMethod, LatentMatcher.Resolved<S>
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
defaultValue
The default value to write to the field or
null if no default value is to be set for the field. |
private FieldAttributeAppender.Factory |
fieldAttributeAppenderFactory
The field attribute appender factory to apply on any matched field.
|
private LatentMatcher<? super FieldDescription> |
matcher
The matcher to identify any field that this definition concerns.
|
private Transformer<FieldDescription> |
transformer
The field transformer to apply to any matched field.
|
Modifier | Constructor and Description |
---|---|
protected |
Entry(LatentMatcher<? super FieldDescription> matcher,
FieldAttributeAppender.Factory fieldAttributeAppenderFactory,
java.lang.Object defaultValue,
Transformer<FieldDescription> transformer)
Creates a new entry.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
getDefaultValue()
Returns the default value to write to the field or
null if no default value is to be set for the field. |
protected FieldAttributeAppender.Factory |
getFieldAttributeAppenderFactory()
Returns the field attribute appender factory to apply on any matched field.
|
protected Transformer<FieldDescription> |
getTransformer()
Returns the field transformer to apply to any matched field.
|
ElementMatcher<? super FieldDescription> |
resolve(TypeDescription typeDescription)
Resolves the element matcher this instance represents for the supplied type description.
|
private final LatentMatcher<? super FieldDescription> matcher
private final FieldAttributeAppender.Factory fieldAttributeAppenderFactory
private final java.lang.Object defaultValue
null
if no default value is to be set for the field.private final Transformer<FieldDescription> transformer
protected Entry(LatentMatcher<? super FieldDescription> matcher, FieldAttributeAppender.Factory fieldAttributeAppenderFactory, java.lang.Object defaultValue, Transformer<FieldDescription> transformer)
matcher
- The matcher to identify any field that this definition concerns.fieldAttributeAppenderFactory
- The field attribute appender factory to apply on any matched field.defaultValue
- The default value to write to the field or null
if no default value is to be set for the field.transformer
- The field transformer to apply to any matched field.protected FieldAttributeAppender.Factory getFieldAttributeAppenderFactory()
protected java.lang.Object getDefaultValue()
null
if no default value is to be set for the field.null
if no default value is to be set for the field.protected Transformer<FieldDescription> getTransformer()
public ElementMatcher<? super FieldDescription> resolve(TypeDescription typeDescription)
resolve
in interface LatentMatcher<FieldDescription>
typeDescription
- The type description for which the represented matcher should be resolved.ElementMatcher
that represents this matcher's resolved form.