com.google.caja.parser.quasiliteral
Class HtmlRuleDoclet

java.lang.Object
  extended by com.google.caja.parser.quasiliteral.RuleDoclet
      extended by com.google.caja.parser.quasiliteral.HtmlRuleDoclet

public class HtmlRuleDoclet
extends RuleDoclet

Extracts and formats the rules of Caja from DefaultCajaRewriter as a html page output to the given file

Author:
jasvir@google.com (Jasvir Nagra)

Field Summary
private  org.w3c.dom.Element body
           
private  int countRules
           
private static java.lang.String HTML_NS
           
private  org.w3c.dom.Document htmlDocument
           
private  org.w3c.dom.Element table
           
 
Fields inherited from class com.google.caja.parser.quasiliteral.RuleDoclet
rewriter
 
Constructor Summary
HtmlRuleDoclet()
           
 
Method Summary
 void finish(java.io.Writer output)
          Initializes the RuleDoclet This method is called before any documentation generation occurs and may be overridden to initialize variables or open files
 void generateFooter(java.io.Writer output, RulesetDescription ruleSet)
          Emits a documentation about ruleSet into the header of the document being written to in output
 void generateHeader(java.io.Writer output, RulesetDescription ruleSet)
          Emits a documentation about ruleSet into the header of the document being written to in output
 void generateRuleDocumentation(java.io.Writer output, RuleDescription anno)
          Emits a documentation describing rule to output
 java.lang.String getDefaultExtension()
          Returns the default file extension for the format output by this doclet.
private  org.w3c.dom.Element headerRow(java.lang.String... cells)
           
 void initialize(java.io.Writer output)
          Initializes the RuleDoclet This method is called before any documentation generation occurs and may be overridden to initialize variables or open files
private  org.w3c.dom.Element row(java.lang.String... cells)
           
 
Methods inherited from class com.google.caja.parser.quasiliteral.RuleDoclet
generateDocumentation, setRewriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

htmlDocument

private org.w3c.dom.Document htmlDocument

body

private org.w3c.dom.Element body

table

private org.w3c.dom.Element table

countRules

private int countRules

HTML_NS

private static final java.lang.String HTML_NS
See Also:
Constant Field Values
Constructor Detail

HtmlRuleDoclet

public HtmlRuleDoclet()
Method Detail

getDefaultExtension

public java.lang.String getDefaultExtension()
Description copied from class: RuleDoclet
Returns the default file extension for the format output by this doclet.

Specified by:
getDefaultExtension in class RuleDoclet

initialize

public void initialize(java.io.Writer output)
Description copied from class: RuleDoclet
Initializes the RuleDoclet This method is called before any documentation generation occurs and may be overridden to initialize variables or open files

Overrides:
initialize in class RuleDoclet
Parameters:
output - a stream to which documentation can be written.

headerRow

private org.w3c.dom.Element headerRow(java.lang.String... cells)

row

private org.w3c.dom.Element row(java.lang.String... cells)

generateHeader

public void generateHeader(java.io.Writer output,
                           RulesetDescription ruleSet)
Description copied from class: RuleDoclet
Emits a documentation about ruleSet into the header of the document being written to in output

Specified by:
generateHeader in class RuleDoclet

generateFooter

public void generateFooter(java.io.Writer output,
                           RulesetDescription ruleSet)
Description copied from class: RuleDoclet
Emits a documentation about ruleSet into the header of the document being written to in output

Specified by:
generateFooter in class RuleDoclet

finish

public void finish(java.io.Writer output)
Description copied from class: RuleDoclet
Initializes the RuleDoclet This method is called before any documentation generation occurs and may be overridden to initialize variables or open files

Specified by:
finish in class RuleDoclet
Parameters:
output - a stream to which documentation can be written.

generateRuleDocumentation

public void generateRuleDocumentation(java.io.Writer output,
                                      RuleDescription anno)
Description copied from class: RuleDoclet
Emits a documentation describing rule to output

Specified by:
generateRuleDocumentation in class RuleDoclet


Copyright (C) 2008 Google Inc.
Licensed under the Apache License, Version 2.0