org.apache.maven.doxia.parser

Class AbstractParser

public abstract class AbstractParser extends Object implements Parser

An abstract base class that defines some convenience methods for parsers. Provides a macro mechanism to give dynamic functionalities for the parsing.

Since: 1.0

Version: $Id: AbstractParser.java 564180 2007-08-09 12:15:44Z vsiveton $

Author: Jason van Zyl

UNKNOWN:

Field Summary
protected MacroManagermacroManager
protected booleansecondParsing
Indicates that a second parsing is required.
Method Summary
voidexecuteMacro(String macroId, MacroRequest request, Sink sink)
Execute a macro on the given sink.
protected FilegetBasedir()
Returns the current base directory.
intgetType()
voidsetSecondParsing(boolean second)
Set secondParsing to true, if we need a second parsing.

Field Detail

macroManager

protected MacroManager macroManager

UNKNOWN:

secondParsing

protected boolean secondParsing
Indicates that a second parsing is required.

Method Detail

executeMacro

public void executeMacro(String macroId, MacroRequest request, Sink sink)
Execute a macro on the given sink.

Parameters: macroId An id to lookup the macro. request The corresponding MacroRequest. sink The sink to receive the events.

Throws: MacroExecutionException if an error occurred during execution. MacroNotFoundException if the macro could not be found.

getBasedir

protected File getBasedir()
Returns the current base directory.

Returns: The base directory.

getType

public int getType()
{@inheritDoc }

setSecondParsing

public void setSecondParsing(boolean second)
Set secondParsing to true, if we need a second parsing.

Parameters: second True for second parsing.

Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.