<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;CHARSET=iso-8859-1"> <title>Software::JRefactory</title> </head> <body> <p> <table border="0"> <tbody> <tr> <td width="150" align="left" valign="top" rowspan="3" bgcolor="#dddddd"> <img src="JRefactory.jpg" alt="Author: Mike Atkinson"> <a href="chrissoft.html">Software</a> <br> <ul> <li> <a href="cspretty.html">Pretty Printer</a> <br> </li> <li> JRefactory<br> </li> <li> <a href="csprint.html">Printing</a> <br> </li> <li> <a href="cselixirext.html">Elixir Extensions</a> <br> </li> <li> <a href="cslineno.html">Line Numbering</a> <br> </li> <li> <a href="csmetrics.html">Metrics</a> <br> </li> <li> <a href="csstub.html">Stub Generator</a> <br> </li> <li> <a href="csdevutil.html">Dev Utilities</a> <br> </li> <li> <a href="csr-roadmap.html">Roadmap</a> <br> </li> <li> <a href="csrtodo.html">Requested Features</a> <br> </li> </ul> <a href="csr-releasenotes.html">Release Notes</a> <br> <a href="chrisdown.html"><b>Download</b></a> <br> <b><a href="authors.html">Contributors</a></b> <br> </td> <td width="35" align="left" valign="top"> <p><a href="ant-task.html"><img src="left.gif" width="30" height="30" align="bottom" alt="Previous Page" border="2"></a> </p> </td> <td align="center"> <h2 align="center">Software::ASTViever </h2> </td> <td width="35" align="right" valign="top"> <p align="right"><a href="csr-moveclass.html"><img src="right.gif" width="30" height="30" align="bottom" alt="Next Page" border="2"></a> </p> </td> </tr> <tr> <td colspan="3"> <h3>Abstract Syntax Tree viewer<br> </h3> <p>This is a tool that shows the abstract syntax tree as found by the JavaStyle parser. (this might be slightly different from that which you would expect from the Java Language Specification).</p> <p><span style="font-weight: bold;">public class X {</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> public X() {</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> int y = 1;</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> }</span><br style="font-weight: bold;"> <span style="font-weight: bold;">}</span><br> </p> <p>has the tree<br> </p> <p><span style="font-weight: bold;"> CompilationUnit<br/> TypeDeclaration<br/> ClassDeclaration<br/> UnmodifiedClassDeclaration<br/> ClassBody<br/> ClassBodyDeclaration<br/> ConstructorDeclaration<br/> FormalParameters<br/> BlockStatement<br/> LocalVariableDeclaration<br/> Type<br/> PrimitiveType<br/> VariableDeclarator<br/> VariableDeclaratorId<br/> VariableInitializer<br/> Expression<br/> ConditionalExpression<br/> ConditionalOrExpression<br/> ConditionalAndExpression<br/> InclusiveOrExpression<br/> ExclusiveOrExpression<br/> <br/> EqualityExpression<br/> InstanceOfExpression<br/> RelationalExpression<br/> ShiftExpression<br/> AdditiveExpression<br/> MultiplicativeExpression<br/> UnaryExpression<br/> UnaryExpressionNotPlusMinus<br/> PostfixExpression<br/> PrimaryExpression<br/> PrimaryPrefix<br/> Literal<br/> </span></p> <p>performing the XPath query</p> <p><span style="font-weight: bold;">//Literal</span></p> <p>give the result</p> <p><span style="font-weight: bold;">ASTLiteral at line 3</span></p> </td> </tr> <tr> <td width="35"><a href="ant-task.html"><img src="left.gif" width="30" height="30" align="bottom" alt="Previous Page" border="2"></a></td> <td align="center"> <p align="center"><font size="2" color="#aaaaaa">Last Modified: October 7, 2003</font> </p> </td> <td width="35" align="right"> <p align="right"><a href="csr-moveclass.html"><img src="right.gif" width="30" height="30" align="bottom" alt="Previous Page" border="2"></a> </p> </td> </tr> </tbody> </table> </p> </body> </html>