Annotation Interface DefaultField


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

Note that the field must be static.

  • Required Element Summary

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

    • clazz

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

      String name
      Returns the field name.
      Returns:
      the field name