pmp.macro
Class Halt

java.lang.Object
  extended by pmp.AbstractMacro
      extended by pmp.macro.Halt

public class Halt
extends AbstractMacro

Halts macroprocessor.

First parameter specifies type of message (passed in second parameter) produced before halting.

Possible values are ERROR, WARNING, NOTICE and SILENT. ERROR means that FatalParserException exception will be thrown. SILENT will not produce any output.

Note: For now, this macro just flushes macroprocessor's input queue. Due to this, macroprocessor may throw "Unexpected end of input" exception in some cases.

Title: PMP: Macroprocessor

Description: Java macroprocessor

Copyright: Copyright (c) 2005

Version:
1.0
Author:
Luděk Hlaváček
See Also:
FatalParserException

Field Summary
static java.lang.String HALT_ERROR
           
static java.lang.String HALT_NOTICE
           
static java.lang.String HALT_SILENT
           
static java.lang.String HALT_WARNING
           
static int PARAMS_REQUIRED
           
 
Constructor Summary
Halt()
           
 
Method Summary
 java.lang.String run(Macroprocessor mp, java.lang.String[] args)
          Main method of macro.
 
Methods inherited from class pmp.AbstractMacro
getRequiredParams, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAMS_REQUIRED

public static final int PARAMS_REQUIRED
See Also:
Constant Field Values

HALT_ERROR

public static final java.lang.String HALT_ERROR
See Also:
Constant Field Values

HALT_WARNING

public static final java.lang.String HALT_WARNING
See Also:
Constant Field Values

HALT_NOTICE

public static final java.lang.String HALT_NOTICE
See Also:
Constant Field Values

HALT_SILENT

public static final java.lang.String HALT_SILENT
See Also:
Constant Field Values
Constructor Detail

Halt

public Halt()
Method Detail

run

public java.lang.String run(Macroprocessor mp,
                            java.lang.String[] args)
Description copied from class: AbstractMacro
Main method of macro. This method is called when this macro is invoked. All subclasses must imlement this method

Specified by:
run in class AbstractMacro
Parameters:
mp - reference to Macroprocessor
args - parameters of macro. In args[0] is stored name of macro. Subclasses are free to modify this array.
Returns:
result of the macro as String