Package net.bytebuddy.dynamic
Class DynamicType.Builder.AbstractBase.Adapter.RecordComponentDefinitionAdapter
- java.lang.Object
-
- net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase<U>
-
- net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Delegator<U>
-
- net.bytebuddy.dynamic.DynamicType.Builder.RecordComponentDefinition.Optional.AbstractBase<U>
-
- net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Adapter.RecordComponentDefinitionAdapter
-
- All Implemented Interfaces:
DynamicType.Builder<U>
,DynamicType.Builder.RecordComponentDefinition<U>
,DynamicType.Builder.RecordComponentDefinition.Optional<U>
- Enclosing class:
- DynamicType.Builder.AbstractBase.Adapter<U>
@Enhance(includeSyntheticFields=true) protected class DynamicType.Builder.AbstractBase.Adapter.RecordComponentDefinitionAdapter extends DynamicType.Builder.RecordComponentDefinition.Optional.AbstractBase<U>
An adapter for defining a record component.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase
DynamicType.Builder.AbstractBase.Adapter<U>, DynamicType.Builder.AbstractBase.Delegator<U>
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder
DynamicType.Builder.AbstractBase<S>, DynamicType.Builder.FieldDefinition<S>, DynamicType.Builder.InnerTypeDefinition<S>, DynamicType.Builder.MethodDefinition<S>, DynamicType.Builder.RecordComponentDefinition<S>, DynamicType.Builder.TypeVariableDefinition<S>
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.RecordComponentDefinition
DynamicType.Builder.RecordComponentDefinition.Optional<U>
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.RecordComponentDefinition.Optional
DynamicType.Builder.RecordComponentDefinition.Optional.AbstractBase<U>
-
-
Field Summary
Fields Modifier and Type Field Description private RecordComponentAttributeAppender.Factory
recordComponentAttributeAppenderFactory
The record component attribute appender factory to apply.private RecordComponentDescription.Token
token
A token representing the defined record component.private Transformer<RecordComponentDescription>
transformer
A transformer to apply on matched record component descriptions.
-
Constructor Summary
Constructors Modifier Constructor Description protected
RecordComponentDefinitionAdapter(RecordComponentDescription.Token token)
Creates a new record component definition adapter.protected
RecordComponentDefinitionAdapter(RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory, Transformer<RecordComponentDescription> transformer, RecordComponentDescription.Token token)
Creates a new record component definition adapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicType.Builder.RecordComponentDefinition.Optional<U>
annotateRecordComponent(java.util.Collection<? extends AnnotationDescription> annotations)
Annotates the record component with the supplied annotations.DynamicType.Builder.RecordComponentDefinition.Optional<U>
attribute(RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory)
Applies the supplied record component attribute appender factory onto the previously defined record component.protected DynamicType.Builder<U>
materialize()
Creates a new builder that realizes the current state of the builder.DynamicType.Builder.RecordComponentDefinition.Optional<U>
transform(Transformer<RecordComponentDescription> transformer)
Transforms a record component description before writing.-
Methods inherited from class net.bytebuddy.dynamic.DynamicType.Builder.RecordComponentDefinition.Optional.AbstractBase
annotateRecordComponent, annotateRecordComponent, annotateRecordComponent
-
Methods inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Delegator
annotateType, attribute, declaredTypes, define, defineConstructor, defineField, defineMethod, defineRecordComponent, field, ignoreAlso, ignoreAlso, implement, initializer, initializer, innerTypeOf, innerTypeOf, invokable, make, make, make, make, merge, modifiers, name, nestHost, nestMembers, permittedSubclass, recordComponent, recordComponent, require, suffix, topLevelType, toTypeDescription, transform, typeVariable, unsealed, visit
-
Methods inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase
annotateType, annotateType, annotateType, constructor, declaredTypes, declaredTypes, declaredTypes, define, define, define, define, define, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineProperty, defineProperty, defineProperty, defineProperty, defineRecordComponent, field, implement, implement, implement, innerTypeOf, innerTypeOf, innerTypeOf, invokable, merge, method, modifiers, modifiers, nestHost, nestMembers, nestMembers, nestMembers, noNestMate, permittedSubclass, permittedSubclass, permittedSubclass, require, require, require, serialVersionUid, typeVariable, typeVariable, typeVariable, typeVariable, withHashCodeEquals, withToString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.dynamic.DynamicType.Builder
annotateType, annotateType, annotateType, annotateType, attribute, constructor, declaredTypes, declaredTypes, declaredTypes, declaredTypes, define, define, define, define, define, define, defineConstructor, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineProperty, defineProperty, defineProperty, defineProperty, defineRecordComponent, defineRecordComponent, field, field, ignoreAlso, ignoreAlso, implement, implement, implement, implement, initializer, initializer, innerTypeOf, innerTypeOf, innerTypeOf, innerTypeOf, innerTypeOf, invokable, invokable, make, make, make, make, merge, merge, method, modifiers, modifiers, modifiers, name, nestHost, nestHost, nestMembers, nestMembers, nestMembers, nestMembers, noNestMate, permittedSubclass, permittedSubclass, permittedSubclass, permittedSubclass, recordComponent, recordComponent, require, require, require, require, serialVersionUid, suffix, topLevelType, toTypeDescription, transform, typeVariable, typeVariable, typeVariable, typeVariable, typeVariable, unsealed, visit, withHashCodeEquals, withToString
-
-
-
-
Field Detail
-
recordComponentAttributeAppenderFactory
private final RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory
The record component attribute appender factory to apply.
-
token
private final RecordComponentDescription.Token token
A token representing the defined record component.
-
transformer
private final Transformer<RecordComponentDescription> transformer
A transformer to apply on matched record component descriptions.
-
-
Constructor Detail
-
RecordComponentDefinitionAdapter
protected RecordComponentDefinitionAdapter(RecordComponentDescription.Token token)
Creates a new record component definition adapter.- Parameters:
token
- A token representing the defined record component.
-
RecordComponentDefinitionAdapter
protected RecordComponentDefinitionAdapter(RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory, Transformer<RecordComponentDescription> transformer, RecordComponentDescription.Token token)
Creates a new record component definition adapter.- Parameters:
recordComponentAttributeAppenderFactory
- The record component attribute appender factory to apply.transformer
- A transformer to apply on matched record component descriptions.token
- A token representing the defined record component.
-
-
Method Detail
-
annotateRecordComponent
public DynamicType.Builder.RecordComponentDefinition.Optional<U> annotateRecordComponent(java.util.Collection<? extends AnnotationDescription> annotations)
Annotates the record component with the supplied annotations.- Parameters:
annotations
- The annotations to declare.- Returns:
- A new builder that is equal to this builder but where the defined component declares the supplied annotations.
-
attribute
public DynamicType.Builder.RecordComponentDefinition.Optional<U> attribute(RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory)
Applies the supplied record component attribute appender factory onto the previously defined record component.- Parameters:
recordComponentAttributeAppenderFactory
- The record component attribute appender factory that should be applied on the previously defined or matched method.- Returns:
- A new builder that is equal to this builder but with the supplied record component attribute appender factory applied to the previously defined record component.
-
transform
public DynamicType.Builder.RecordComponentDefinition.Optional<U> transform(Transformer<RecordComponentDescription> transformer)
Transforms a record component description before writing.- Parameters:
transformer
- The transformer to apply.- Returns:
- new builder that is equal to this builder but with the supplied transformer being applied.
-
materialize
protected DynamicType.Builder<U> materialize()
Description copied from class:DynamicType.Builder.AbstractBase.Delegator
Creates a new builder that realizes the current state of the builder.- Specified by:
materialize
in classDynamicType.Builder.AbstractBase.Delegator<U>
- Returns:
- A new builder that realizes the current state of the builder.
-
-