Annotation Type DefaultCall
-
@Documented @Retention(RUNTIME) @Target(PARAMETER) public @interface DefaultCall
A parameter with this annotation is assigned a proxy for invoking a default method that fits the intercepted method. If no suitable default method for the intercepted method can be identified, the target method with the annotated parameter is considered to be unbindable.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
nullIfImpossible
Assignsnull
to the parameter if it is impossible to invoke the super method or a possible dominant default method, if permitted.boolean
serializableProxy
Determines if the generated proxy should beSerializable
.java.lang.Class<?>
targetType
If this parameter is not explicitly set, a parameter with theDefaultCall
is only bound to a source method if this source method directly represents an unambiguous, invokable default method.
-
-
-
Element Detail
-
targetType
java.lang.Class<?> targetType
If this parameter is not explicitly set, a parameter with theDefaultCall
is only bound to a source method if this source method directly represents an unambiguous, invokable default method. On the other hand, if a method is not defined unambiguously by an interface, not setting this parameter will exclude the target method with the annotated parameter from a binding to the source method.- Returns:
- The target interface that a default method invocation is to be defined upon. If no such explicit target
is set, this parameter should not be defined as the predefined
void
type encodes an implicit resolution.
- Default:
- void.class
-
-
-
nullIfImpossible
boolean nullIfImpossible
Assignsnull
to the parameter if it is impossible to invoke the super method or a possible dominant default method, if permitted.- Returns:
true
if anull
constant should be assigned to this parameter in case that a legal binding is impossible.
- Default:
- false
-
-