Package org.radeox.macro
Class Preserved
- java.lang.Object
-
- org.radeox.macro.BaseMacro
-
- org.radeox.macro.Preserved
-
- All Implemented Interfaces:
Comparable,org.radeox.api.macro.Macro
- Direct Known Subclasses:
LocalePreserved
public abstract class Preserved extends BaseMacro
A specialized macro that allows to preserve certain special characters by creating character entities. The subclassing macro may decide whether to call replace() before or after executing the actual macro substitution.- Version:
- $Id$
- Author:
- Matthias L. Jugel
-
-
Field Summary
-
Fields inherited from class org.radeox.macro.BaseMacro
description, initialContext, paramDescription
-
-
Constructor Summary
Constructors Constructor Description Preserved()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddSpecial(char c)Encode special character c by replacing with it's hex character entity code.protected voidaddSpecial(String c, String replacement)Add a replacement for the special character c which may be a stringprotected Stringreplace(String source)Actually replace specials in source.-
Methods inherited from class org.radeox.macro.BaseMacro
compareTo, execute, getDescription, getName, getParamDescription, setInitialContext, toString
-
-
-
-
Method Detail
-
addSpecial
protected void addSpecial(char c)
Encode special character c by replacing with it's hex character entity code.
-
addSpecial
protected void addSpecial(String c, String replacement)
Add a replacement for the special character c which may be a string- Parameters:
c- the character to replacereplacement- the new string
-
-