org.apache.maven.doxia.macro
Class AbstractMacro

java.lang.Object
  extended by org.apache.maven.doxia.macro.AbstractMacro
All Implemented Interfaces:
LogEnabled, Macro
Direct Known Subclasses:
EchoMacro, SnippetMacro, SwfMacro, TocMacro

public abstract class AbstractMacro
extends java.lang.Object
implements Macro

Abstract base class to execute Macro.

Since:
1.0
Version:
$Id: AbstractMacro.java 747735 2009-02-25 10:43:09Z ltheussl $
Author:
Jason van Zyl

Field Summary
 
Fields inherited from interface org.apache.maven.doxia.macro.Macro
EOL, ROLE
 
Constructor Summary
AbstractMacro()
           
 
Method Summary
 void enableLogging(Log log)
          
protected  Log getLog()
          Returns a logger for this macro.
protected  void required(java.lang.String paramName, java.lang.String paramValue)
          Check if the given parameter is required.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.doxia.macro.Macro
execute
 

Constructor Detail

AbstractMacro

public AbstractMacro()
Method Detail

enableLogging

public void enableLogging(Log log)

Specified by:
enableLogging in interface LogEnabled

getLog

protected Log getLog()
Returns a logger for this macro. If no logger has been configured, a new SystemStreamLog is returned.

Returns:
Log
Since:
1.1

required

protected void required(java.lang.String paramName,
                        java.lang.String paramValue)
Check if the given parameter is required. Throws an IllegalArgumentException if paramValue is null or empty.

Parameters:
paramName - The name of the parameter to check.
paramValue - The parameter value.
Since:
1.1


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.