|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfc.web.page.PageParser
public final class PageParser
Parses a page and writes out the corresponding java file to the specified output. The parser and scanner is combined into one class here for simplicity (a seperate scanner is overkill for a simple LL(1) grammar such as molly pages).
| Field Summary | |
|---|---|
static java.lang.String |
d_buffersize
The name ("buffersize") of the [page buffersize=....] directive |
static java.lang.String |
d_encoding
The name ("encoding") of the [page encoding=....] directive. |
static java.lang.String |
d_mimetype
The name ("mimetype") of the[@ mimetype=....] directive. |
static java.lang.String |
d_out
The name ("out") of the [page out=....] directive |
static java.lang.String |
d_out_stream1
A value ("outputstream") of the [page out=outputstream] directive |
static java.lang.String |
d_out_stream2
A value ("outputstream") of the [page out=stream] directive |
static java.lang.String |
d_out_writer
A value ("writer") of the [page out=writer] directive |
static java.lang.String |
d_remove_all_emptylines
The name of the ("remove-all-emptylines") directive |
static java.lang.String |
d_remove_initial_emptylines
The name of the ("remove-initial-whitespace") directive |
static java.lang.String |
d_src_encoding
The name ("src-encoding") of the [page src-encoding=....] directive. |
static java.lang.String |
mimetype_none
|
| Constructor Summary | |
|---|---|
PageParser(java.io.File contextRoot,
java.io.File input,
java.io.File output,
java.lang.String classname)
Creates a new page parser that will use the default log obtained by Log.getDefault() |
|
PageParser(java.io.File contextRoot,
java.io.File input,
java.io.File output,
java.lang.String classname,
Log log)
Creates a new page parser. |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
|
void |
parse()
Parses the page. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String d_mimetype
javax.servlet.ServletResponse.setContentType method manually).
Note, from ServletResponse
Note that the character encoding cannot be communicated via HTTP headers if the servlet does not specify a content type; however, it is still used to encode text written via the servlet response's writer.
public static java.lang.String mimetype_none
public static java.lang.String d_encoding
public static java.lang.String d_src_encoding
public static java.lang.String d_buffersize
public static java.lang.String d_out
public static java.lang.String d_out_stream1
public static java.lang.String d_out_stream2
public static java.lang.String d_out_writer
public static java.lang.String d_remove_initial_emptylines
public static java.lang.String d_remove_all_emptylines
| Constructor Detail |
|---|
public PageParser(java.io.File contextRoot,
java.io.File input,
java.io.File output,
java.lang.String classname)
throws java.io.IOException
Log.getDefault()
contextRoot - absolute path to the webapp context root directoryinput - absolute path to the input page fileinput - absolute path to the output file (to be written to).classname - classname to give to the generated java class.
java.io.IOException
public PageParser(java.io.File contextRoot,
java.io.File input,
java.io.File output,
java.lang.String classname,
Log log)
throws java.io.IOException
contextRoot - absolute path to the webapp context root directoryinput - absolute path to the input page fileoutput - absolute path to the output file (to be written to).classname - classname to give to the generated java class.
java.io.IOException| Method Detail |
|---|
public void parse()
throws java.io.IOException
java.io.IOException - a parse failure occurred. The java source file
may or may not be properly generated or written
in this case.
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||