Annotation Interface Arg


@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface Arg

Annotation specifies location where attribute should be stored.

You can annotate fields and methods. For methods, it must have only 1 format argument. Use dest() to specify which attribute to be assigned. If it is empty, the name of the attribute or method will be used instead. If the attribute value cannot be assigned to designated location, error will be issued. If you want to ignore this error, use ignoreError().

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of attribute to be assigned.
    boolean
    Set true if you want to ignore the error in assignment.
  • Element Details

    • dest

      String dest
      The name of attribute to be assigned.
      Returns:
      The name of attribute
      Default:
      ""
    • ignoreError

      boolean ignoreError
      Set true if you want to ignore the error in assignment.
      Returns:
      true or false
      Default:
      false