| java.lang.Object simple.page.translate.Classifier
Classifier | final class Classifier (Code) | | The Classifier object is used to classify tokens that
have been emitted from the lexical analysis phase. This will
examine the text within the token to determine the class of token.
Classification of the token results in a Token object
being created. This object is then used to process the data.
author: Niall Gallagher |
getToken | public Token getToken(String token)(Code) | | This method performs the classification of the token. This will
examine the structure of the token before classifing it. This
basically takes a look at the JSP tags beginning the token and
from the tags determines the class of token it represents.
Parameters: token - this is the token text to be classified this returns a token to process the provided text |
getToken | public Token getToken(Class type, String token)(Code) | | This method is used to create a token of the specified type. The
class provided must extend the Token object. Once
the token has been created it can be processed, and used to
build the document definition before the generation phase.
Parameters: type - this is the class implementing the token type Parameters: token - this is the text to be processed by the token this returns a token that can parse the text provided |
|
|