jatha
Interface MacroFactory

All Known Implementing Classes:
DefaultMacroFactory

public interface MacroFactory

MacroFactories are used to create Macro objects when a macro call is encountered in a file. For example, if a file contains @foo(x,y), the Expander would go through the registered MacroFactories and ask each in turn to try to create a macro called "foo". The default macro factory uses Class.forName() to create the macro. Other factories could use other techniques; for example, a C-style #define could be simulated by using a factory which allows new macros to be defined on the fly.

Note: you must register your factory with the Expander class.

Note: if two factories handle the same macro name, it is undefined which one will win.

See Also:
DefaultMacroFactory, Expander

Method Summary
 Macro createMacro(java.lang.String macroName, Expander expander)
          Returns null if this factory can't create the requested macro
 

Method Detail

createMacro

public Macro createMacro(java.lang.String macroName,
                         Expander expander)
Returns null if this factory can't create the requested macro