pmp.macro
Class Echo
java.lang.Object
pmp.AbstractMacro
pmp.macro.Echo
public class Echo
- extends AbstractMacro
Prints string directly into macroprocessor output.
Use with care. If invoked from inside other mocro's parameters,
given string will be ouputted before any other output from
enclosing macro.
ifelse('abc','.',echo('hello'))
will output "hello.".
Processing sequence:
ifelse('abc','.',echo('hello'))
ifelse('abc','.','')
=> outputs 'hello'
'.'
=> outputs '.'
Title: PMP: Macroprocessor
Description: Java macroprocessor
Copyright: Copyright (c) 2005
- Version:
- 1.0
- Author:
- Luděk Hlaváček
Constructor Summary |
Echo()
|
Method Summary |
java.lang.String |
run(Macroprocessor mp,
java.lang.String[] params)
Main method of macro. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PARAMS_REQUIRED
public static final int PARAMS_REQUIRED
- See Also:
- Constant Field Values
Echo
public Echo()
run
public java.lang.String run(Macroprocessor mp,
java.lang.String[] params)
- 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 Macroprocessorparams
- 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