Annotation Interface RequireField


@Target(TYPE) @Retention(SOURCE) @Repeatable(RequireFields.class) public @interface RequireField
The RequireField determines asserts that a field exists in a specific location, with a specific name and of a specific type.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The target class where a field is declared
    The name of the field
    The type for a field
  • Element Details

    • in

      Class<?> in
      The target class where a field is declared
      Returns:
      the target class where this field is declared
    • name

      String name
      The name of the field
      Returns:
      the name of this field
    • ofType

      Class<?> ofType
      The type for a field
      Returns:
      the type of this field