org.pz.platypus.plugin.listing
Class HtmlListingStrategy

java.lang.Object
  extended by org.pz.platypus.plugin.listing.HtmlListingStrategy
Direct Known Subclasses:
HtmlBlockCommentListingStrategy, HtmlCommandListingStrategy, HtmlCompoundCommandListingStrategy, HtmlCRListingStrategy, HtmlLineBreakStrategy, HtmlLineCommentListingStrategy, HtmlMacroListingStrategy, HtmlSymbolListingStrategy, HtmlTextListingStrategy

public abstract class HtmlListingStrategy
extends java.lang.Object

The strategy base class.

Author:
ask

Field Summary
protected  java.util.logging.Logger logger
           
 
Constructor Summary
HtmlListingStrategy()
           
 
Method Summary
abstract  boolean canOutputHtmlEndOfLine()
           
static java.lang.String convertToHtmlText(java.lang.String text)
          Utility method used by subclasses.
abstract  java.lang.String format(Token tok, GDD gdd)
           
static HtmlListingStrategy getFormatStrategy(Token tok)
          The "factory method" for creating the correct Strategy instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected java.util.logging.Logger logger
Constructor Detail

HtmlListingStrategy

public HtmlListingStrategy()
Method Detail

format

public abstract java.lang.String format(Token tok,
                                        GDD gdd)
                                 throws java.io.IOException
Throws:
java.io.IOException

canOutputHtmlEndOfLine

public abstract boolean canOutputHtmlEndOfLine()

getFormatStrategy

public static HtmlListingStrategy getFormatStrategy(Token tok)
The "factory method" for creating the correct Strategy instance. Ideally, this would be the only "switching on types" code.

Parameters:
tok - token that is to be processed
Returns:
The strategy object encapsulating the processing algorithm.

convertToHtmlText

public static java.lang.String convertToHtmlText(java.lang.String text)
Utility method used by subclasses. Replaces reserved HTML characters to make text printable

Parameters:
text - text to transform
Returns:
text string with the transformation applied


Copyright © 2008-10 Pacific Data Works LLC