|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.g11ntoolkit.parser.java.LTTreeWalker
|
+--com.g11ntoolkit.parser.java.LTVisitor
Traverse the parse tree from the first token in the tree to the last token.
This class was adapted from the LTVisitor found in the VTransformer sample in the JavaCC 3.2 package.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See License Agreement.
| Field Summary | |
private static java.util.logging.Logger |
log
The log used for all messages from this class. |
| Fields inherited from class com.g11ntoolkit.parser.java.LTTreeWalker |
arrayLevel, contentsId, expression, gcm, gotKey, gotValue, inContents, inMethod, key, needCN, openForKVPair, out, ret, retnew, retobj, strfile, targetLocale, theContextFileName, token, tokfile, value, valueEndCol, valueEndRow, valueStartCol, valueStartRow, xliffrb |
| Constructor Summary | |
LTVisitor()
Establishes an instance of the class. |
|
LTVisitor(java.io.PrintStream o)
Establishes an instance of the class and sets the PrintStream object in the parent class. |
|
| Method Summary | |
void |
setContextFileName(java.lang.String tc)
Sets the Context File Name to be used by the Tree Walker. |
void |
setStrFile(StrFile sf)
Sets the StrFile to be used by the Tree Walker |
void |
setTargetLocale(java.util.Locale tl)
Sets the target locale to be used by the Tree Walker. |
void |
setTokenObject(Token tk)
Sets the com.g11ntoolkit.token.Token object to be used by the Tree Walker. |
void |
setTokFile(TokFile tf)
Sets the TokFile to be used by the Tree Walker. |
java.lang.Object |
visit(LTClassBodyDeclaration node,
java.lang.Object data)
Traverse each node in the tree to get each one printed. |
java.lang.Object |
visit(LTCompilationUnit node,
java.lang.Object data)
Traverse each node in the tree to get each one printed. |
void |
writeXLIFF(java.io.OutputStreamWriter osw)
Writes the tree walker results to an XLIFF format file. |
| Methods inherited from class com.g11ntoolkit.parser.java.LTTreeWalker |
print, removeConcat, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, walk |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static java.util.logging.Logger log
| Constructor Detail |
public LTVisitor(java.io.PrintStream o)
o - a PrintStream specifying the print stream object to use for output.public LTVisitor()
| Method Detail |
public java.lang.Object visit(LTClassBodyDeclaration node,
java.lang.Object data)
visit in interface JavaParserVisitorvisit in class LTTreeWalkernode - a LTClassBodyDeclaration specifying the first node in the treedata - an Object specifying ???
public java.lang.Object visit(LTCompilationUnit node,
java.lang.Object data)
visit in interface JavaParserVisitorvisit in class LTTreeWalkernode - a LTCompilationUnit specifying the first node in the treedata - an Object specifying ???
public void setStrFile(StrFile sf)
setStrFile in interface LTParserVisitorsetStrFile in class LTTreeWalkersf - a StrFile specifying the StrFile object to be usedpublic void setTokFile(TokFile tf)
setTokFile in interface LTParserVisitorsetTokFile in class LTTreeWalkertf - a TokFile specifying the TokFile object to be usedpublic void setContextFileName(java.lang.String tc)
setContextFileName in interface LTParserVisitorsetContextFileName in class LTTreeWalkertc - a String specifying the file name to be used for the context of each extracted stringpublic void setTargetLocale(java.util.Locale tl)
setTargetLocale in interface LTParserVisitorsetTargetLocale in class LTTreeWalkertl - a Locale object specifying the target locale to be used for each extracted stringpublic void setTokenObject(Token tk)
setTokenObject in interface LTParserVisitorsetTokenObject in class LTTreeWalkertk - a com.g11ntoolkit.token.Token object specifying the token object to be used to generate the tokens for each extracted stringpublic void writeXLIFF(java.io.OutputStreamWriter osw)
writeXLIFF in interface LTParserVisitorwriteXLIFF in class LTTreeWalkerosw - a OutputStreamWriter specifying the output stream writer to use
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||