Annotation Type DefaultMethodHandle
-
@Documented @Retention(RUNTIME) @Target(PARAMETER) public @interface DefaultMethodHandleA parameter with this annotation is assigned an instance ofjava.lang.invoke.MethodHandlewhich invokes a default method implementation of this method. If such a method is not available, this annotation causes that this delegation target cannot be bound unlessnullIfImpossible()is set totrue. Note that requesting such a method exposes the default method to reflective access.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleannullIfImpossibleIndicates thatnullshould be assigned to this parameter if no default method is invokable.java.lang.Class<?>targetTypeSpecifies an explicit type that declares the default method to invoke.
-
-
-
Element Detail
-
targetType
java.lang.Class<?> targetType
Specifies an explicit type that declares the default method to invoke.- Returns:
- The type declaring the method to invoke or
TargetTypeto indicate that the instrumented method declared the method.
- Default:
- void.class
-
-