Annotation Interface DefaultMethod


@Retention(RUNTIME) @Target({CONSTRUCTOR,FIELD,RECORD_COMPONENT}) public @interface DefaultMethod
An annotation to get a default value from the method.

Note that the method must be static.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the class where the method is located.
    Returns the method name.
  • Element Details

    • clazz

      Class<?> clazz
      Returns the class where the method is located.
      Returns:
      the class where the method is located
    • name

      String name
      Returns the method name.
      Returns:
      the method name