jatha
Class DefaultMacroFactory

java.lang.Object
  |
  +--jatha.DefaultMacroFactory
All Implemented Interfaces:
MacroFactory

public class DefaultMacroFactory
extends java.lang.Object
implements MacroFactory

This macro factory tries to create macros by dynamically loading a class in the "macros" package with the same name as the macro call. For example, if a file contains the macro call @FOO(a,b), this factory will try to load the class macros.FOO, create a new instance, and cast it to a Macro.

See Also:
MacroFactory

Constructor Summary
DefaultMacroFactory()
           
 
Method Summary
 Macro createMacro(java.lang.String macroName, Expander expander)
          Returns null if this factory can't create the requested macro
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMacroFactory

public DefaultMacroFactory()
Method Detail

createMacro

public Macro createMacro(java.lang.String macroName,
                         Expander expander)
Description copied from interface: MacroFactory
Returns null if this factory can't create the requested macro
Specified by:
createMacro in interface MacroFactory