|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The TagHandler
interface controls what happens
when a tag is encountered with a specific name. The tag handler
is responsible for both parsing and then executing a given tag,
as well as retaining tag attribute properties and their values
so they can also be used after parsing.
Method Summary | |
void |
executeTag(ParseContext context,
PositionReader input,
boolean parseTime)
actually perform the action associated with this tag. |
long |
getLineNumber()
Returns the line number at which this tag handler was invoked. |
java.lang.String |
getNameProperty()
Called to get the identification tag attribute property called "name". |
java.util.Map |
getProperties()
Called to get a Map of tag attribute properties and their values. |
long |
getTagLength()
Get the length of the area in the sourcefile. |
long |
getTagStart()
Get start position of the area in the sourcefile this handler processes. |
SGMLTag |
parseTag(CompilationContext context,
PositionReader input,
long startPos,
SGMLTag startTag)
Parse tag. |
void |
postParsePostProperties(CompilationContext context)
This method is called after the tag has been compiled and AFTER any tag properties have been processed. |
void |
postParsePreProperties(CompilationContext context)
This method is called after the tag has been compiled but BEFORE any tag properties have been processed. |
Method Detail |
public void executeTag(ParseContext context, PositionReader input, boolean parseTime) throws java.lang.Exception
java.lang.Exception
- anything can happen .. and throw an Exception
which is caught in PageParserpublic long getTagLength()
<SpecialTag>
or the
area <SpecialTag>...</SpecialTag>
public long getTagStart()
<
"PositionReaderPositionReader
of the <SpecialTag>
within the inputfile.
public java.util.Map getProperties()
public java.lang.String getNameProperty()
public long getLineNumber()
public SGMLTag parseTag(CompilationContext context, PositionReader input, long startPos, SGMLTag startTag) throws java.io.IOException
parseTag()
method is called before
any processing is done. Its purpose is to parse the area
this tag spans and probably read in parameters used at
execution time.
This method returns the last tag belonging to the area handled by this handler
.
For simple one-tag Handlers this is simply the tag passed
to this method. If the Handler decides not to handle this tag, this
method should return null
.
context
- The CompilationContext involvedinput
- The PositionReader, located after the Name token
of the TagstartPos
- The Position parsing of this token beganstartTag
- the SGMLTag found in the file.
java.io.IOException
public void postParsePreProperties(CompilationContext context)
context
- The CompilationContext involvedpublic void postParsePostProperties(CompilationContext context)
context
- The CompilationContext involved
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |