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 Classes Modifier and Type Interface Description static interfaceDynamicType.Builder.RecordComponentDefinition.Optional<U>ADynamicType.Builder.RecordComponentDefinitionas an optional build step.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DynamicType.Builder.RecordComponentDefinition.Optional<S>annotateRecordComponent(java.lang.annotation.Annotation... annotation)Annotates the record component with the supplied annotations.DynamicType.Builder.RecordComponentDefinition.Optional<S>annotateRecordComponent(java.util.Collection<? extends AnnotationDescription> annotations)Annotates the record component with the supplied annotations.DynamicType.Builder.RecordComponentDefinition.Optional<S>annotateRecordComponent(java.util.List<? extends java.lang.annotation.Annotation> annotations)Annotates the record component with the supplied annotations.DynamicType.Builder.RecordComponentDefinition.Optional<S>annotateRecordComponent(AnnotationDescription... annotation)Annotates the record component with the supplied annotations.DynamicType.Builder.RecordComponentDefinition.Optional<S>attribute(RecordComponentAttributeAppender.Factory recordComponentAttributeAppenderFactory)Applies the supplied record component attribute appender factory onto the previously defined record component.DynamicType.Builder.RecordComponentDefinition.Optional<S>transform(Transformer<RecordComponentDescription> transformer)Transforms a record component description before writing.
-
-
-
Method Detail
-
annotateRecordComponent
DynamicType.Builder.RecordComponentDefinition.Optional<S> annotateRecordComponent(java.lang.annotation.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(java.util.List<? extends java.lang.annotation.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(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
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.
-
-