| simple.page.translate.Parser simple.page.translate.Token simple.page.translate.Print
Print | class Print extends Token (Code) | | The Print object is used to process the JSP print
token. This performs a very simple parsing of the provided token.
The following token is evaluated by this token.
<%= expression %>
This above "expression" is wrapped within a print statement.
This allows the generated page to print expression results.
author: Niall Gallagher |
Constructor Summary | |
public | Print() Constructor for the Print token. | public | Print(String token) Constructor for the Print token. |
Method Summary | |
protected void | init() This will clear the print token so that the parse can be reused
by the builder. | protected void | parse() This is a very simple parse method which basically extracts the
begining and end values from the token. | public void | process(Definition source, Builder builder) This method will supply code to the document definition that
will allow an expression to be printed by the page. |
Print | public Print()(Code) | | Constructor for the Print token. This will
create a buffer, which can be used to accumulate the data
extracted from the supplied print token.
|
Print | public Print(String token)(Code) | | Constructor for the Print token. This will
create a buffer, which can be used to accumulate the data
extracted from the supplied print token before parsing.
Parameters: token - this is the print token to be parsed |
init | protected void init()(Code) | | This will clear the print token so that the parse can be reused
by the builder. In practice this method just satisfies the
contract of the token so that this object is not abstract.
|
parse | protected void parse()(Code) | | This is a very simple parse method which basically extracts the
begining and end values from the token. For instance this will
remove "<%=" and "%>" from the token supplied.
|
process | public void process(Definition source, Builder builder)(Code) | | This method will supply code to the document definition that
will allow an expression to be printed by the page. The data
inserted into the definition will be displayed in the body.
Parameters: source - this is the source to push the code into Parameters: builder - this is the builder driving the process |
|
|