Package net.bytebuddy.implementation
Interface Implementation
- All Superinterfaces:
InstrumentedType.Prepareable
- All Known Subinterfaces:
FieldAccessor.AssignerConfigurable
,FieldAccessor.OwnerTypeLocatable
,FieldAccessor.PropertyConfigurable
,FixedValue.AssignerConfigurable
,Implementation.Composable
,InvocationHandlerAdapter.AssignerConfigurable
,InvocationHandlerAdapter.WithoutPrivilegeConfiguration
- All Known Implementing Classes:
Advice
,AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.BridgeMethodImplementation
,AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.ConstructorImplementation
,AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.FactoryImplementation
,AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation
,AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.SerializationImplementation
,ByteBuddy.EnumerationImplementation
,ByteBuddy.RecordConstructorStrategy
,ByteBuddy.RecordObjectMethod
,DefaultMethodCall
,EqualsMethod
,ExceptionMethod
,FieldAccessor
,FieldAccessor.ForImplicitProperty
,FieldAccessor.ForSetter
,FieldAccessor.ForSetter.OfConstantValue
,FieldAccessor.ForSetter.OfDefaultValue
,FieldAccessor.ForSetter.OfFieldValue
,FieldAccessor.ForSetter.OfParameterValue
,FieldAccessor.ForSetter.OfReferenceValue
,FieldProxy.Binder.FieldGetter
,FieldProxy.Binder.FieldSetter
,FieldProxy.Binder.InstanceFieldConstructor
,FieldProxy.Binder.StaticFieldConstructor
,FixedValue
,FixedValue.ForArgument
,FixedValue.ForConstantValue
,FixedValue.ForNullValue
,FixedValue.ForOriginType
,FixedValue.ForThisValue
,FixedValue.ForValue
,HashCodeMethod
,Implementation.Compound
,Implementation.Compound.Composable
,Implementation.Simple
,Implementation.Simple.ForDispatcher
,InvocationHandlerAdapter
,InvocationHandlerAdapter.ForField
,InvocationHandlerAdapter.ForInstance
,InvokeDynamic
,InvokeDynamic.AbstractDelegator
,InvokeDynamic.WithImplicitArguments
,InvokeDynamic.WithImplicitTarget
,InvokeDynamic.WithImplicitType
,InvokeDynamic.WithImplicitType.OfArgument
,InvokeDynamic.WithImplicitType.OfField
,InvokeDynamic.WithImplicitType.OfInstance
,MethodCall
,MethodCall.FieldSetting
,MethodCall.WithoutSpecifiedTarget
,MethodCallProxy.ConstructorCall
,MethodCallProxy.MethodCall
,MethodDelegation
,Morph.Binder.RedirectionProxy.InstanceFieldConstructor
,Morph.Binder.RedirectionProxy.MethodCall
,Morph.Binder.RedirectionProxy.StaticFieldConstructor
,Pipe.Binder.RedirectionProxy.ConstructorCall
,Pipe.Binder.RedirectionProxy.MethodCall
,StubMethod
,SuperMethodCall
,SuperMethodCall.WithoutReturn
,ToStringMethod
,TypeProxy.MethodCall
,TypeProxy.SilentConstruction
An implementation is responsible for implementing methods of a dynamically created type as byte code. An
implementation is applied in two stages:
- The implementation is able to prepare an instrumented type by adding fields and/or helper methods that are
required for the methods implemented by this implementation. Furthermore,
LoadedTypeInitializer
s and byte code for the type initializer can be registered for the instrumented type. - Any implementation is required to supply a byte code appender that is responsible for providing the byte code to the instrumented methods that were delegated to this implementation. This byte code appender is also be responsible for providing implementations for the methods added in step 1.
An implementation should provide meaningful implementations of both
Object.equals(Object)
and Object.hashCode()
if it wants to avoid to be used twice within the creation of a dynamic type. For two
equal implementations only one will be applied on the creation of a dynamic type.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Represents an implementation that can be chained together with another implementation.static class
A compound implementation that allows to combine several implementations.static interface
The context for an implementation application.static class
A simple implementation that does not register any members with the instrumented type.static interface
Represents a type-specific method invocation on the current instrumented type which is not legal from outside the type such as a super method or default method invocation.static interface
The target of an implementation.Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp
-
Method Summary
Modifier and TypeMethodDescriptionappender
(Implementation.Target implementationTarget) Creates a byte code appender that determines the implementation of the instrumented type's methods.Methods inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
prepare
-
Method Details
-
appender
Creates a byte code appender that determines the implementation of the instrumented type's methods.- Parameters:
implementationTarget
- The target of the current implementation.- Returns:
- A byte code appender for implementing methods delegated to this implementation. This byte code appender
is also responsible for handling methods that were added by this implementation on the call to
InstrumentedType.Prepareable.prepare(InstrumentedType)
.
-