| simple.page.translate.Parser simple.page.translate.Token simple.page.translate.Include
Include | class Include extends Token (Code) | | The Include object is used to process JSP includes.
This require recursive processing of the document, as its source
lies in seperate files. The following token is processed.
<%@ include file="path" %>
This above token requires that the "path" refers to a file that
exists relative to the parent JSP source. For example if the
parent was "/path/Parent.jsp" and the file parameter was the
path "../File.jsp" then "/File.jsp" is the sourc evaluated.
author: Niall Gallagher |
Constructor Summary | |
public | Include() Constructor for the Include token. | public | Include(String token) Constructor for the Include token. |
Method Summary | |
protected void | init() This will clear the name token so that the parse can be reused
by the builder. | protected void | parse() This does not verify the token type, instead this will seek
the '=' character. | public void | process(Definition source, Builder builder) This will use the extracted path from the include token to
recursively process the document definition. |
Include | public Include()(Code) | | Constructor for the Include token. This will
create a buffer, which can be used to accumulate the data
extracted from the supplied include token.
|
Include | public Include(String token)(Code) | | Constructor for the Include token. This will
create a buffer, which can be used to accumulate the data
extracted from the supplied insert token before parsing.
Parameters: token - this is the include token to be parsed |
init | protected void init()(Code) | | This will clear the name 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 does not verify the token type, instead this will seek
the '=' character. Once the '=' character has been encountered
the file is extracted as a quoted string, for example "path".
|
process | public void process(Definition source, Builder builder) throws IOException(Code) | | This will use the extracted path from the include token to
recursively process the document definition. This basically
uses asks the builder to build and the evaluate the named
file, if the file does not exist an exception is throws.
Parameters: source - this is the document definition processed Parameters: builder - this is used for recursive JSP processing |
|
|