Package net.bytebuddy.dynamic
Interface DynamicType.Builder.RecordComponentDefinition<S>
- Type Parameters:
S
- A loaded type that the built type is guaranteed to be a subclass of.
- All Known Subinterfaces:
DynamicType.Builder.RecordComponentDefinition.Optional<U>
- All Known Implementing Classes:
DynamicType.Builder.AbstractBase.Adapter.RecordComponentDefinitionAdapter
,DynamicType.Builder.AbstractBase.Adapter.RecordComponentMatchAdapter
,DynamicType.Builder.RecordComponentDefinition.Optional.AbstractBase
- Enclosing interface:
DynamicType.Builder<T>
public static interface DynamicType.Builder.RecordComponentDefinition<S>
A builder for a record component definition.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
ADynamicType.Builder.RecordComponentDefinition
as an optional build step. -
Method Summary
Modifier and TypeMethodDescriptionannotateRecordComponent
(Annotation... annotation) Annotates the record component with the supplied annotations.annotateRecordComponent
(Collection<? extends AnnotationDescription> annotations) Annotates the record component with the supplied annotations.annotateRecordComponent
(List<? extends Annotation> annotations) Annotates the record component with the supplied annotations.annotateRecordComponent
(AnnotationDescription... annotation) Annotates the record component with the supplied annotations.attribute
(RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory) Applies the supplied record component attribute appender factory onto the previously defined record component.transform
(Transformer<RecordComponentDescription> transformer) Transforms a record component description before writing.
-
Method Details
-
annotateRecordComponent
DynamicType.Builder.RecordComponentDefinition.Optional<S> annotateRecordComponent(Annotation... annotation) Annotates the record component with the supplied annotations.- Parameters:
annotation
- The annotations to declare.- Returns:
- A new builder that is equal to this builder but where the defined component declares the supplied annotations.
-
annotateRecordComponent
DynamicType.Builder.RecordComponentDefinition.Optional<S> annotateRecordComponent(List<? extends Annotation> 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.
-
annotateRecordComponent
DynamicType.Builder.RecordComponentDefinition.Optional<S> annotateRecordComponent(AnnotationDescription... annotation) Annotates the record component with the supplied annotations.- Parameters:
annotation
- The annotations to declare.- Returns:
- A new builder that is equal to this builder but where the defined component declares the supplied annotations.
-
annotateRecordComponent
DynamicType.Builder.RecordComponentDefinition.Optional<S> annotateRecordComponent(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
DynamicType.Builder.RecordComponentDefinition.Optional<S> 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
DynamicType.Builder.RecordComponentDefinition.Optional<S> 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.
-