Package net.bytebuddy.dynamic.scaffold
Class FieldRegistry.Default
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.FieldRegistry.Default
-
- All Implemented Interfaces:
FieldRegistry
- Enclosing interface:
- FieldRegistry
public static class FieldRegistry.Default extends java.lang.Object implements FieldRegistry
An immutable default implementation of a field registry.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classFieldRegistry.Default.CompiledA compiled default field registry.protected static classFieldRegistry.Default.EntryAn entry of the default field registry.-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.FieldRegistry
FieldRegistry.Default
-
-
Constructor Summary
Constructors Constructor Description Default()Creates a new empty default field registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldRegistry.Compiledcompile(TypeDescription instrumentedType)Prepares the field registry for a given instrumented type.FieldRegistryprepend(LatentMatcher<? super FieldDescription> matcher, FieldAttributeAppender.Factory fieldAttributeAppenderFactory, java.lang.Object defaultValue, Transformer<FieldDescription> transformer)Prepends the given field definition to this field registry, i.e.
-
-
-
Method Detail
-
prepend
public FieldRegistry prepend(LatentMatcher<? super FieldDescription> matcher, FieldAttributeAppender.Factory fieldAttributeAppenderFactory, java.lang.Object defaultValue, Transformer<FieldDescription> transformer)
Description copied from interface:FieldRegistryPrepends the given field definition to this field registry, i.e. this configuration is applied first.- Specified by:
prependin interfaceFieldRegistry- Parameters:
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 ornullif no default value is to be set for the field.transformer- The field transformer to apply to any matched field.- Returns:
- An adapted version of this method registry.
-
compile
public FieldRegistry.Compiled compile(TypeDescription instrumentedType)
Description copied from interface:FieldRegistryPrepares the field registry for a given instrumented type.- Specified by:
compilein interfaceFieldRegistry- Parameters:
instrumentedType- The instrumented type.- Returns:
- A prepared field registry.
-
-