JavaDoq 1.0 API

com.javadoq.html
Class DoqHTMLSourceFile

java.lang.Object
  extended by com.javadoq.html.Doq
      extended by com.javadoq.html.DoqHTMLFile
          extended by com.javadoq.html.DoqHTMLBody
              extended by com.javadoq.html.DoqHTMLSourceFile
Direct Known Subclasses:
DoqHTMLJavaFile

public abstract class DoqHTMLSourceFile
extends DoqHTMLBody

An abstract base class of transformers that perform transformation of source files to HTML files.

Author:
J.J.Liu (Jianjun Liu) at http://www.javadoq.com

Nested Class Summary
protected  class DoqHTMLSourceFile.CharStream
          A JavaCharStream filter to escape unicodes.
 
Field Summary
 SourceFile file
          The source file to transform.
protected  java.lang.String format
          The format of line numbers.
 
Fields inherited from class com.javadoq.html.DoqHTMLFile
jdoq
 
Fields inherited from class com.javadoq.html.Doq
fileName, fileWriter, LINE_SEPARATOR, STYLE_SHEET
 
Constructor Summary
DoqHTMLSourceFile(SourceFile file)
          Constructs a DoqHTMLSourceFile transformer.
 
Method Summary
 void close()
          Closes the target HTML body.
protected  java.lang.String getLineNumber()
          Gets the current line number.
 void writeHTML(char c)
          Writes a char to the target file as HTML text.
 void writeHTML(java.lang.String str)
          Writes a string to the target file as HTML text.
 void writeHTML(Token t)
          Writes a Token to the target file as HTML text.
 
Methods inherited from class com.javadoq.html.DoqHTMLFile
writeFrameItem
 
Methods inherited from class com.javadoq.html.Doq
write, write, writeLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

public final SourceFile file

The source file to transform.

Since:
1.0

format

protected java.lang.String format

The format of line numbers.

Since:
1.0
Constructor Detail

DoqHTMLSourceFile

public DoqHTMLSourceFile(SourceFile file)

Constructs a DoqHTMLSourceFile transformer.

This constructor invokes its super constructor to create or open the target file, open HTML and HTML body, and write the header.

Parameters:
file - The source file to transform.
Since:
1.0
Method Detail

close

public void close()

Closes the target HTML body.

This method writes the footer and invokes its super method to close HTML body, HTML and the file.

Overrides:
close in class DoqHTMLBody
Since:
1.0

getLineNumber

protected java.lang.String getLineNumber()

Gets the current line number.

Returns:
The HTML text for the current line number.
Since:
1.0

writeHTML

public void writeHTML(char c)

Writes a char to the target file as HTML text.

Parameters:
c - The char to parse and write.
Since:
1.0

writeHTML

public void writeHTML(java.lang.String str)

Writes a string to the target file as HTML text.

Parameters:
str - The string to parse and write.
Since:
1.0

writeHTML

public void writeHTML(Token t)

Writes a Token to the target file as HTML text.

Parameters:
t - The Token to parse and write.
Since:
1.0

JavaDoq 1.0 API

Copyright © 2008-2011 J.J.Liu (www.javadoq.com). All Rights Reserved.