Class TypeProxy.ForDefaultMethod
java.lang.Object
net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
net.bytebuddy.implementation.auxiliary.TypeProxy.ForDefaultMethod
- All Implemented Interfaces:
StackManipulation
- Enclosing class:
TypeProxy
Creates a type proxy which delegates its super method calls to any invokable default method of
a given interface and loads an instance of this proxy onto the operand stack.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
StackManipulation.AbstractBase, StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Implementation.Target
The implementation target for the original instrumentation.private final TypeDescription
The proxied interface type.private final boolean
true
if the proxy should beSerializable
. -
Constructor Summary
ConstructorsConstructorDescriptionForDefaultMethod
(TypeDescription proxiedType, Implementation.Target implementationTarget, boolean serializableProxy) Creates a new proxy creation for a default interface type proxy. -
Method Summary
Modifier and TypeMethodDescriptionapply
(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext) Applies the stack manipulation that is described by this instance.Methods inherited from class net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
isValid
-
Field Details
-
proxiedType
The proxied interface type. -
implementationTarget
The implementation target for the original instrumentation. -
serializableProxy
private final boolean serializableProxytrue
if the proxy should beSerializable
.
-
-
Constructor Details
-
ForDefaultMethod
public ForDefaultMethod(TypeDescription proxiedType, Implementation.Target implementationTarget, boolean serializableProxy) Creates a new proxy creation for a default interface type proxy.- Parameters:
proxiedType
- The proxied interface type.implementationTarget
- The implementation target for the original implementation.serializableProxy
-true
if the proxy should beSerializable
.
-
-
Method Details
-
apply
public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext) Applies the stack manipulation that is described by this instance.- Parameters:
methodVisitor
- The method visitor used to write the method implementation to.implementationContext
- The context of the current implementation.- Returns:
- The changes to the size of the operand stack that are implied by this stack manipulation.
-