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.ForNullValue
,FixedValue.ForOriginType
,FixedValue.ForPoolValue
,FixedValue.ForThisValue
,FixedValue.ForValue
,HashCodeMethod
,Implementation.Compound
,Implementation.Compound.Composable
,Implementation.Simple
,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.Redirection.ConstructorCall
,Pipe.Binder.Redirection.MethodCall
,StubMethod
,SuperMethodCall
,SuperMethodCall.WithoutReturn
,ToStringMethod
,TypeProxy.MethodCall
,TypeProxy.SilentConstruction
public interface Implementation extends InstrumentedType.Prepareable
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.
Object.equals(Object)
andObject.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 Classes Modifier and Type Interface Description static interface
Implementation.Composable
Represents an implementation that can be chained together with another implementation.static class
Implementation.Compound
A compound implementation that allows to combine several implementations.static interface
Implementation.Context
The context for an implementation application.static class
Implementation.Simple
A simple implementation that does not register any members with the instrumented type.static interface
Implementation.SpecialMethodInvocation
Represents an 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
Implementation.Target
The target of an implementation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteCodeAppender
appender(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 Detail
-
appender
ByteCodeAppender appender(Implementation.Target implementationTarget)
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)
.
-
-