Annotation Interface Morph
This annotation instructs Byte Buddy to inject a proxy class that calls a method's super method with
explicit arguments. For this, the
Morph.Binder
needs to be installed for an interface type that takes an argument of the array type Object and
returns a non-array type of Object. This is an alternative to using the
SuperCall or
DefaultCall annotations which call a super
method using the same arguments as the intercepted method was invoked with.- See Also:
-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanDetermines if the proxy should attempt to invoke a default method.Class<?> The type on which a default method should be invoked.booleanDetermines if the injected proxy for this parameter should be serializable.
-
Element Details
-
serializableProxy
boolean serializableProxyDetermines if the injected proxy for this parameter should be serializable.- Returns:
trueif the proxy should be serializable.
- Default:
false
-
defaultMethod
boolean defaultMethodDetermines if the proxy should attempt to invoke a default method. If the default method is ambiguous, use thedefaultTarget()property instead which allows to determine an explicit interface on which the default method should be invoked on. If this other method is used, this property is ignored.- Returns:
trueif a default method should be ignored.
- Default:
false
-
defaultTarget
Class<?> defaultTargetThe type on which a default method should be invoked. When this property is not set and thedefaultMethod()property is set tofalse, a normal super method invocation is attempted.- Returns:
- The target interface of a default method call.
- Default:
void.class
-