Annotation Interface Default


@Documented @Retention(RUNTIME) @Target(PARAMETER) public @interface Default
Parameters that are annotated with this annotation are assigned an instance of an auxiliary proxy type that allows calling any default method of an interface of the instrumented type where the parameter type must be an interface that is directly implemented by the instrumented type. The generated proxy will directly implement the parameter's interface. If the interface of the annotation is not implemented by the instrumented type, the method with this parameter is not considered as a binding target.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    A binder for the Default annotation.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Determines the type that is implemented by the proxy.
    boolean
    Determines if the generated proxy should be Serializable.
  • Element Details

    • serializableProxy

      boolean serializableProxy
      Determines if the generated proxy should be Serializable. If the annotated type already is serializable, such an explicit specification is not required.
      Returns:
      true if the generated proxy should be Serializable.
      Default:
      false
    • proxyType

      Class<?> proxyType
      Determines the type that is implemented by the proxy. When this value is set to its default value void, the proxy is created as an instance of the parameter's type. It is not possible to set the value of this property to TargetType as a interface cannot implement itself.
      Returns:
      The type of the proxy or an indicator type, i.e. void.
      Default:
      void.class