java.lang.Object
org.jdrupes.mdoclet.internal.doclets.toolkit.Messages

public class Messages extends Object
Provides standardized access to the diagnostic reporting facilities for a doclet.

Messages are specified by resource keys to be found in the doclet’s resources. Values can be substituted into the strings obtained from the resource files.

Messages are reported to the doclet’s reporter.

  • Konstruktordetails

    • Messages

      public Messages(BaseConfiguration configuration, Resources resources)
      Creates a Messages object to provide standardized access to the doclet’s diagnostic reporting mechanisms.
      Parameter:
      configuration - the doclet’s configuration, used to access the doclet’s reporter, and additional methods and state used to filter out messages, if any, which should be suppressed.
      resources - resources for console messages and exceptions
  • Methodendetails

    • getResources

      Returns the resources being used when generating messages.
      Gibt zurück:
      the resources
    • error

      public void error(String key, Object... args)
      Reports an error message to the doclet’s reporter.
      Parameter:
      key - the name of a resource containing the message to be printed
      args - optional arguments to be replaced in the message
    • error

      public void error(DocTreePath path, String key, Object... args)
      Reports an error message to the doclet’s reporter.
      Parameter:
      path - a path identifying the position to be included with the message
      key - the name of a resource containing the message to be printed
      args - optional arguments to be replaced in the message
    • error

      public void error(DocTreePath path, int start, int pos, int end, String key, Object... args)
      Reports an error message to the doclet’s reporter.
      Parameter:
      path - a path identifying the position to be included with the message
      start - the start of a range of characters to be associated with the message
      pos - the position to be associated with the message
      end - the end of a range of characters to be associated with the message
      key - the name of a resource containing the message to be printed
      args - optional arguments to be replaced in the message
    • error

      public void error(FileObject fo, int start, int pos, int end, String key, Object... args)
      Reports an error message to the doclet’s reporter.
      Parameter:
      fo - the file object to be associated with the message
      start - the start of a range of characters to be associated with the message
      pos - the position to be associated with the message
      end - the end of a range of characters to be associated with the message
      key - the name of a resource containing the message to be printed
      args - optional arguments to be replaced in the message
    • error

      public void error(Element e, String key, Object... args)
      Reports an error message to the doclet’s reporter.
      Parameter:
      e - an element identifying the position to be included with the message
      key - the name of a resource containing the message to be printed
      args - optional arguments to be replaced in the message
    • warning

      public void warning(String key, Object... args)
      Reports a warning message to the doclet’s reporter.
      Parameter:
      key - the name of a resource containing the message to be printed
      args - optional arguments to be replaced in the message
    • warning

      public void warning(DocTreePath path, String key, Object... args)
      Reports a warning message to the doclet’s reporter.
      Parameter:
      path - a path identifying the position to be included with the message
      key - the name of a resource containing the message to be printed
      args - optional arguments to be replaced in the message
    • warning

      public void warning(DocTreePath path, int start, int pos, int end, String key, Object... args)
      Reports a warning message to the doclet’s reporter.
      Parameter:
      path - a path identifying the position to be included with the message
      start - the start of a range of characters to be associated with the message
      pos - the position to be associated with the message
      end - the end of a range of characters to be associated with the message
      key - the name of a resource containing the message to be printed
      args - optional arguments to be replaced in the message
    • warning

      public void warning(Element e, String key, Object... args)
      Reports a warning message to the doclet’s reporter.
      Parameter:
      e - an element identifying the position to be included with the message
      key - the name of a resource containing the message to be printed
      args - optional arguments to be replaced in the message
    • warning

      public void warning(FileObject fo, int start, int pos, int end, String key, Object... args)
      Reports a warning message to the doclet’s reporter.
      Parameter:
      fo - the file object to be associated with the message
      start - the start of a range of characters to be associated with the message
      pos - the position to be associated with the message
      end - the end of a range of characters to be associated with the message
      key - the name of a resource containing the message to be printed
      args - optional arguments to be replaced in the message
    • notice

      public void notice(String key, Object... args)
      Reports an informational notice to the doclet’s reporter.

      The message is written directly to the reporter’s diagnostic stream.

      Parameter:
      key - the name of a resource containing the message to be printed
      args - optional arguments to be replaced in the message