@Target(TYPE) @Retention(RUNTIME) public @interface PrintOpts
Interface used to define the behavior of the object when printing its content dynamically. This prevents elements that you don't want to expose or some sensitive property from being printed.
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Option to give access to the getter elements of an instance.
    Prefix regular expression indicating which methods will be accessible by name
    Suffix regular expression indicating which methods will be accessible by name
    boolean
    Option to give access to the internal elements of an instance.
    boolean
    Recursively traverses the inheritance tree until it reaches the root class.
    boolean
    Print instance short name
  • Element Details

    • shortName

      boolean shortName
      Print instance short name
      Returns:
      short name status
      Default:
      true
    • recursive

      boolean recursive
      Recursively traverses the inheritance tree until it reaches the root class.
      Returns:
      recursive status
      Default:
      false
    • privateFieldsAccess

      boolean privateFieldsAccess
      Option to give access to the internal elements of an instance.
      Returns:
      true if inner elements can be accessed or false otherwise
      Default:
      false
    • getterAccess

      boolean getterAccess
      Option to give access to the getter elements of an instance.
      Returns:
      true if getter elements can be accessed or false otherwise
      Default:
      false
    • getterPrefix

      @RegExp String getterPrefix
      Prefix regular expression indicating which methods will be accessible by name
      Returns:
      the regular expression to identify all valid methods
      Default:
      "^(get|is)"
    • getterSuffix

      @RegExp String getterSuffix
      Suffix regular expression indicating which methods will be accessible by name
      Returns:
      the regular expression to identify all valid methods
      Default:
      ""