Package net.bytebuddy.implementation
Class Implementation.Simple.ForDispatcher
- java.lang.Object
-
- net.bytebuddy.implementation.Implementation.Simple.ForDispatcher
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,Implementation
- Enclosing class:
- Implementation.Simple
@Enhance protected static class Implementation.Simple.ForDispatcher extends java.lang.Object implements Implementation
AByteCodeAppender
for a dispatcher.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
Implementation.Simple.ForDispatcher.Appender
An appender for a dispatcher-based simple implementation.-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.Implementation
Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Target
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp
-
-
Field Summary
Fields Modifier and Type Field Description private int
additionalVariableLength
The additional length of the local variable array.private Implementation.Simple.Dispatcher
dispatcher
The dispatcher to use.private InstrumentedType.Prepareable
prepareable
A preparation of the instrumented type.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForDispatcher(Implementation.Simple.Dispatcher dispatcher, InstrumentedType.Prepareable prepareable, int additionalVariableLength)
Creates a new byte code appender for a dispatcher.
-
Method Summary
All Methods Instance Methods Concrete 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.InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
-
-
-
Field Detail
-
dispatcher
private final Implementation.Simple.Dispatcher dispatcher
The dispatcher to use.
-
prepareable
private final InstrumentedType.Prepareable prepareable
A preparation of the instrumented type.
-
additionalVariableLength
private final int additionalVariableLength
The additional length of the local variable array.
-
-
Constructor Detail
-
ForDispatcher
protected ForDispatcher(Implementation.Simple.Dispatcher dispatcher, InstrumentedType.Prepareable prepareable, int additionalVariableLength)
Creates a new byte code appender for a dispatcher.- Parameters:
dispatcher
- The dispatcher to use.prepareable
- A preparation of the instrumented type.additionalVariableLength
- The additional length of the local variable array.
-
-
Method Detail
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.- Specified by:
prepare
in interfaceInstrumentedType.Prepareable
- Parameters:
instrumentedType
- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
appender
public ByteCodeAppender appender(Implementation.Target implementationTarget)
Creates a byte code appender that determines the implementation of the instrumented type's methods.- Specified by:
appender
in interfaceImplementation
- 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)
.
-
-