Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| HTML Parser Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.htmlparser.util
Class DefaultParserFeedback

    java.lang.Object
      org.htmlparser.util.DefaultParserFeedback

All Implemented Interfaces:
  ParserFeedback, Serializable

public class DefaultParserFeedback
extends Object
implements ParserFeedback, Serializable

Default implementation of the HTMLParserFeedback interface. This implementation prints output to the console but users can implement their own classes to support alternate behavior.

See Also:
  `ParserFeedback`, `FeedbackManager`, Serialized Form

Field Summary
`static int` | `DEBUG` Constructor argument for a debugging feedback.
`protected int` | `mMode` Verbosity level.
`static int` | `NORMAL` Constructor argument for a normal feedback.
`static int` | `QUIET` Constructor argument for a quiet feedback.

Constructor Summary
`DefaultParserFeedback()` Construct a NORMAL feedback object.
`DefaultParserFeedback(int mode)` Construct a feedback object of the given type.

Method Summary
`void` | `error(String message, ParserException exception)` Print an error message.
`void` | `info(String message)` Print an info message.
`void` | `warning(String message)` Print an warning message.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### QUIET

    public static final int QUIET

  Constructor argument for a quiet feedback.

  See Also:
    Constant Field Values

### NORMAL

    public static final int NORMAL

  Constructor argument for a normal feedback.

  See Also:
    Constant Field Values

### DEBUG

    public static final int DEBUG

  Constructor argument for a debugging feedback.

  See Also:
    Constant Field Values

### mMode

    protected int mMode

  Verbosity level. Corresponds to constructor arguments:

         DEBUG = 2;
         NORMAL = 1;
         QUIET = 0;

Constructor Detail

### DefaultParserFeedback

    public DefaultParserFeedback(int mode)

  Construct a feedback object of the given type.

Parameters:
  `mode` - The type of feedback:

         DEBUG - verbose debugging with stack traces
         NORMAL - normal messages
         QUIET - no messages

Throws:
  `IllegalArgumentException` - if mode is not QUIET, NORMAL or DEBUG.

### DefaultParserFeedback

    public DefaultParserFeedback()

  Construct a NORMAL feedback object.

Method Detail

### info

    public void info(String message)

  Print an info message.

  Specified by:
    `info` in interface `ParserFeedback`
  Parameters:
    `message` - The message to print.

### warning

    public void warning(String message)

  Print an warning message.

  Specified by:
    `warning` in interface `ParserFeedback`
  Parameters:
    `message` - The message to print.

### error

    public void error(String message,
                      ParserException exception)

  Print an error message.

  Specified by:
    `error` in interface `ParserFeedback`
  Parameters:
    `message` - The message to print.
    `exception` - The exception for stack tracing.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| © 2004 Somik Raha Mar 14, 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

HTML Parser is an open source library released under LGPL.