Annotation Interface Prototype.IncludeDefaultMethods

Enclosing class:
Prototype

@Target(TYPE) @Retention(CLASS) public static @interface Prototype.IncludeDefaultMethods
Include default methods from the blueprint and its super types (interface methods declared as default).

If the value is specified, only methods with names matching the values are included, as long as they qualify as blueprint methods (i.e. they have a non-void return type and zero parameters).

This can be used to define backward compatible changes.

Behavior for handling default methods on interfaces in blueprints:

  • If this annotation is NOT present on a blueprint, methods declared as default are ignored
  • If this annotation is present on a blueprint and has empty value, all methods declared as default are included as long as they are property getters (non-void, no parameters, not private)
  • If this annotation is present on a blueprint and has non-empty value, only methods with names matching a value are included as long as they are property getters (non-void, no parameters, not private
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Names of default methods from super types or this blueprint to include as prototype properties.
  • Element Details

    • value

      String[] value
      Names of default methods from super types or this blueprint to include as prototype properties. This can be used for backward compatibility.
      Returns:
      names of methods, if left blank, all default methods are included
      See Also:
      Default:
      {}