Package lombok

Annotation Type ToString.Include


  • @Target({FIELD,METHOD})
    @Retention(SOURCE)
    public static @interface ToString.Include
    Configure the behaviour of how this member is rendered in the toString; if on a method, include the method's return value in the output.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String name
      Defaults to the field / method name of the annotated member.
      int rank
      Higher ranks are printed first.
    • Element Detail

      • rank

        int rank
        Higher ranks are printed first. Members of the same rank are printed in the order they appear in the source file.
        Returns:
        ordering within the generating toString(); higher numbers are printed first.
        Default:
        0
      • name

        java.lang.String name
        Defaults to the field / method name of the annotated member. If the name equals the name of a default-included field, this member takes its place.
        Returns:
        The name to show in the generated toString(). Also, if this annotation is on a method and the name matches an existing field, it replaces that field.
        Default:
        ""