Class RuleDescription

java.lang.Object
cdc.issues.StructuredDescription
cdc.issues.rules.RuleDescription

public class RuleDescription extends StructuredDescription
Specialization of StructuredDescription that can be used to describe a Rule.

It supports the following sections:

  • Remarks that can be used to add remarks.
  • Sources that can be used to refer to related sources.
  • Applies to that can be used to designate things to which the rule can be applied.
  • Exceptions that can be used to designate exceptions to the rule.
  • Related to that can be used to create link with other rules.
Author:
Damien Carbonne
  • Field Details

  • Constructor Details

  • Method Details

    • format

      public static String format(String format, Object... args)
      Formats a list of arguments with a format.

      The following format specifiers are supported:

      • wrap: the passed argument is wrapped with '[' and ']'.
      • lower: if the passed argument is null, nothing is inserted, otherwise a space followed by the passed argument converted to lower case is inserted.
      • capital: if the passed argument is null, nothing is inserted, otherwise a space followed by the passed argument converted to capital case is inserted.
      Examples:
      • format("Foo{%lower}Bar", null) = "FooBar"
      • format("Foo{%lower}Bar", "AA") = "Foo aaBar"
      • format("Foo{%wrap}Bar", "AA") = "Foo[AA]Bar"
      Parameters:
      format - The format string.
      args - The arguments.
      Returns:
      A string formatted for format and args.
    • wrap

      public static String wrap(String item)
    • wrap

      public static String wrap(String article, boolean capital, String item)
    • builder

      public static RuleDescription.Builder<?> builder()