Package net.bytebuddy.dynamic
Class DynamicType.Builder.MethodDefinition.AbstractBase.Adapter<V>
- java.lang.Object
-
- net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase<U>
-
- net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Delegator<U>
-
- net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.AbstractBase<V>
-
- net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition.AbstractBase<V>
-
- net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.AbstractBase.Adapter<V>
-
- Type Parameters:
V
- A loaded type that the built type is guaranteed to be a subclass of.
- All Implemented Interfaces:
DynamicType.Builder<V>
,DynamicType.Builder.MethodDefinition<V>
,DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<V>
- Direct Known Subclasses:
DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter.AnnotationAdapter
,DynamicType.Builder.AbstractBase.Adapter.MethodMatchAdapter.AnnotationAdapter
- Enclosing class:
- DynamicType.Builder.MethodDefinition.AbstractBase<U>
@Enhance protected abstract static class DynamicType.Builder.MethodDefinition.AbstractBase.Adapter<V> extends DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition.AbstractBase<V>
An adapter implementation of a method definition.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.AbstractBase
DynamicType.Builder.MethodDefinition.AbstractBase.Adapter<V>
-
Nested classes/interfaces inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase
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.MethodDefinition
DynamicType.Builder.MethodDefinition.AbstractBase<U>, DynamicType.Builder.MethodDefinition.ExceptionDefinition<U>, DynamicType.Builder.MethodDefinition.ImplementationDefinition<U>, DynamicType.Builder.MethodDefinition.ParameterDefinition<U>, DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition<U>, DynamicType.Builder.MethodDefinition.TypeVariableDefinition<U>
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition
DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition.AbstractBase<V>
-
-
Field Summary
Fields Modifier and Type Field Description protected MethodRegistry.Handler
handler
The handler that determines how a method is implemented.protected MethodAttributeAppender.Factory
methodAttributeAppenderFactory
The method attribute appender factory to apply onto the method that is currently being implemented.protected Transformer<MethodDescription>
transformer
The transformer to apply onto the method that is currently being implemented.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Adapter(MethodRegistry.Handler handler, MethodAttributeAppender.Factory methodAttributeAppenderFactory, Transformer<MethodDescription> transformer)
Creates a new adapter for a method definition.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description DynamicType.Builder.MethodDefinition<V>
attribute(MethodAttributeAppender.Factory methodAttributeAppenderFactory)
Applies the supplied method attribute appender factory onto the previously defined or matched method.protected abstract DynamicType.Builder.MethodDefinition<V>
materialize(MethodRegistry.Handler handler, MethodAttributeAppender.Factory methodAttributeAppenderFactory, Transformer<MethodDescription> transformer)
Materializes the current builder as a method definition.DynamicType.Builder.MethodDefinition<V>
transform(Transformer<MethodDescription> transformer)
Applies the supplied transformer onto the previously defined or matched method.-
Methods inherited from class net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition.AbstractBase
receiverType
-
Methods inherited from class net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.AbstractBase
annotateMethod, annotateMethod, annotateMethod, annotateParameter, annotateParameter, annotateParameter
-
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, materialize, 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
-
Methods inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition
annotateMethod, annotateMethod, annotateMethod, annotateMethod, annotateParameter, annotateParameter, annotateParameter, annotateParameter
-
Methods inherited from interface net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ReceiverTypeDefinition
receiverType
-
-
-
-
Field Detail
-
handler
protected final MethodRegistry.Handler handler
The handler that determines how a method is implemented.
-
methodAttributeAppenderFactory
protected final MethodAttributeAppender.Factory methodAttributeAppenderFactory
The method attribute appender factory to apply onto the method that is currently being implemented.
-
transformer
protected final Transformer<MethodDescription> transformer
The transformer to apply onto the method that is currently being implemented.
-
-
Constructor Detail
-
Adapter
protected Adapter(MethodRegistry.Handler handler, MethodAttributeAppender.Factory methodAttributeAppenderFactory, Transformer<MethodDescription> transformer)
Creates a new adapter for a method definition.- Parameters:
handler
- The handler that determines how a method is implemented.methodAttributeAppenderFactory
- The method attribute appender factory to apply onto the method that is currently being implemented.transformer
- The transformer to apply onto the method that is currently being implemented.
-
-
Method Detail
-
attribute
public DynamicType.Builder.MethodDefinition<V> attribute(MethodAttributeAppender.Factory methodAttributeAppenderFactory)
Applies the supplied method attribute appender factory onto the previously defined or matched method.- Parameters:
methodAttributeAppenderFactory
- The method 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 method attribute appender factory applied to the previously defined or matched method.
-
transform
public DynamicType.Builder.MethodDefinition<V> transform(Transformer<MethodDescription> transformer)
Applies the supplied transformer onto the previously defined or matched method. The transformed method is written as it is and it not subject to any validations.- Parameters:
transformer
- The transformer to apply to the previously defined or matched method.- Returns:
- A new builder that is equal to this builder but with the supplied transformer applied to the previously defined or matched method.
-
materialize
protected abstract DynamicType.Builder.MethodDefinition<V> materialize(MethodRegistry.Handler handler, MethodAttributeAppender.Factory methodAttributeAppenderFactory, Transformer<MethodDescription> transformer)
Materializes the current builder as a method definition.- Parameters:
handler
- The handler that determines how a method is implemented.methodAttributeAppenderFactory
- The method attribute appender factory to apply onto the method that is currently being implemented.transformer
- The method transformer to apply onto the method that is currently being implemented.- Returns:
- Returns a method definition for the supplied properties.
-
-