Class Debug

java.lang.Object
org.apache.xml.resolver.helpers.Debug

public class Debug extends Object
Static debugging/messaging class for Catalogs.

This class defines a set of static methods that can be called to produce debugging messages. Messages have an associated "debug level" and messages below the current setting are not displayed.

Version:
1.0
Author:
Norman Walsh Norman.Walsh@Sun.COM
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    The internal debug level.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the current debug level.
    void
    message(int level, String message)
    Print debug message (if the debug level is high enough).
    void
    message(int level, String message, String spec)
    Print debug message (if the debug level is high enough).
    void
    message(int level, String message, String spec1, String spec2)
    Print debug message (if the debug level is high enough).
    void
    setDebug(int newDebug)
    Set the debug level for future messages.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • debug

      protected int debug
      The internal debug level.
  • Constructor Details

    • Debug

      public Debug()
      Constructor
  • Method Details

    • setDebug

      public void setDebug(int newDebug)
      Set the debug level for future messages.
    • getDebug

      public int getDebug()
      Get the current debug level.
    • message

      public void message(int level, String message)
      Print debug message (if the debug level is high enough).

      Prints "the message"

      Parameters:
      level - The debug level of this message. This message will only be displayed if the current debug level is at least equal to this value.
      message - The text of the message.
    • message

      public void message(int level, String message, String spec)
      Print debug message (if the debug level is high enough).

      Prints "the message: spec"

      Parameters:
      level - The debug level of this message. This message will only be displayed if the current debug level is at least equal to this value.
      message - The text of the message.
      spec - An argument to the message.
    • message

      public void message(int level, String message, String spec1, String spec2)
      Print debug message (if the debug level is high enough).

      Prints "the message: spec1" and "spec2" indented on the next line.

      Parameters:
      level - The debug level of this message. This message will only be displayed if the current debug level is at least equal to this value.
      message - The text of the message.
      spec1 - An argument to the message.
      spec2 - Another argument to the message.