| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.6.0_14) on Wed Apr 07 07:58:08 BST 2010 --> |
| <TITLE> |
| ASTUtils |
| </TITLE> |
| |
| <META NAME="date" CONTENT="2010-04-07"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ASTUtils"; |
| } |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| <HR> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ASTUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| PREV CLASS |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../../../index.html?org/eclipse/jst/ws/jaxws/utils/clazz/ASTUtils.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="ASTUtils.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.eclipse.jst.ws.jaxws.utils.clazz</FONT> |
| <BR> |
| Class ASTUtils</H2> |
| <PRE> |
| java.lang.Object |
| <IMG SRC="../../../../../../../resources/inherit.gif" ALT="extended by "><B>org.eclipse.jst.ws.jaxws.utils.clazz.ASTUtils</B> |
| </PRE> |
| <HR> |
| <DL> |
| <DT><PRE>public class <B>ASTUtils</B><DT>extends java.lang.Object</DL> |
| </PRE> |
| |
| <P> |
| Utility class that provides helper methods for <CODE>AST</CODE> processing. |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Author:</B></DT> |
| <DD>Georgi Vachkov</DD> |
| </DL> |
| <HR> |
| |
| <P> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> org.eclipse.jdt.core.dom.ASTNode</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/utils/clazz/ASTUtils.html#createAST(java.io.File, org.eclipse.core.runtime.IProgressMonitor)">createAST</A></B>(java.io.File sourceFile, |
| org.eclipse.core.runtime.IProgressMonitor monitor)</CODE> |
| |
| <BR> |
| Creates AST tree out of <CODE>File</CODE> instance.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> org.eclipse.jdt.core.dom.CompilationUnit</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/utils/clazz/ASTUtils.html#createCompilationUnit(org.eclipse.jdt.core.ICompilationUnit, org.eclipse.core.runtime.IProgressMonitor)">createCompilationUnit</A></B>(org.eclipse.jdt.core.ICompilationUnit sourceCu, |
| org.eclipse.core.runtime.IProgressMonitor monitor)</CODE> |
| |
| <BR> |
| Creates <CODE>AST</CODE> tree out of <CODE>IType</CODE> instance.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> org.eclipse.jdt.core.dom.FieldDeclaration</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/utils/clazz/ASTUtils.html#getFieldDeclaration(org.eclipse.jdt.core.IField, org.eclipse.jdt.core.dom.TypeDeclaration)">getFieldDeclaration</A></B>(org.eclipse.jdt.core.IField fieldType, |
| org.eclipse.jdt.core.dom.TypeDeclaration typeDeclaration)</CODE> |
| |
| <BR> |
| Finds <CODE>FieldDeclaration</CODE> in <CODE>TypeDeclaration</CODE> with name <code>fieldType.getElementName()</code>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/utils/clazz/ASTUtils.html" title="class in org.eclipse.jst.ws.jaxws.utils.clazz">ASTUtils</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/utils/clazz/ASTUtils.html#getInstance()">getInstance</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> org.eclipse.jdt.core.dom.MethodDeclaration</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/utils/clazz/ASTUtils.html#getMethodDeclaration(org.eclipse.jdt.core.IMethod, org.eclipse.jdt.core.dom.TypeDeclaration)">getMethodDeclaration</A></B>(org.eclipse.jdt.core.IMethod methodType, |
| org.eclipse.jdt.core.dom.TypeDeclaration typeDeclaration)</CODE> |
| |
| <BR> |
| Finds <CODE>MethodDeclaration</CODE> in <CODE>TypeDeclaration</CODE> having name <code>methodType.getElementName()</code>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> org.eclipse.jdt.core.dom.AbstractTypeDeclaration</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/utils/clazz/ASTUtils.html#getTypeDeclaration(java.lang.String, org.eclipse.jdt.core.dom.CompilationUnit)">getTypeDeclaration</A></B>(java.lang.String className, |
| org.eclipse.jdt.core.dom.CompilationUnit unit)</CODE> |
| |
| <BR> |
| Retrieves <CODE>TypeDeclaration</CODE> from <CODE>CompilationUnit</CODE> with name <tt>className</tt></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/utils/clazz/ASTUtils.html#getTypeSignature(org.eclipse.jdt.core.dom.SingleVariableDeclaration)">getTypeSignature</A></B>(org.eclipse.jdt.core.dom.SingleVariableDeclaration svDecl)</CODE> |
| |
| <BR> |
| Retrieves type signature from <CODE>SingleVariableDeclaration</CODE>.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="getInstance()"><!-- --></A><H3> |
| getInstance</H3> |
| <PRE> |
| public static <A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/utils/clazz/ASTUtils.html" title="class in org.eclipse.jst.ws.jaxws.utils.clazz">ASTUtils</A> <B>getInstance</B>()</PRE> |
| <DL> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>create new instance for this utility</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createAST(java.io.File, org.eclipse.core.runtime.IProgressMonitor)"><!-- --></A><H3> |
| createAST</H3> |
| <PRE> |
| public org.eclipse.jdt.core.dom.ASTNode <B>createAST</B>(java.io.File sourceFile, |
| org.eclipse.core.runtime.IProgressMonitor monitor) |
| throws java.io.IOException</PRE> |
| <DL> |
| <DD>Creates AST tree out of <CODE>File</CODE> instance. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>sourceFile</CODE> - java class file<DD><CODE>monitor</CODE> - progress monitor |
| <DT><B>Returns:</B><DD>created <CODE>ASTNode</CODE> |
| <DT><B>Throws:</B> |
| <DD><CODE>java.io.IOException</CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="createCompilationUnit(org.eclipse.jdt.core.ICompilationUnit, org.eclipse.core.runtime.IProgressMonitor)"><!-- --></A><H3> |
| createCompilationUnit</H3> |
| <PRE> |
| public org.eclipse.jdt.core.dom.CompilationUnit <B>createCompilationUnit</B>(org.eclipse.jdt.core.ICompilationUnit sourceCu, |
| org.eclipse.core.runtime.IProgressMonitor monitor)</PRE> |
| <DL> |
| <DD>Creates <CODE>AST</CODE> tree out of <CODE>IType</CODE> instance. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>sourceType</CODE> - java class<DD><CODE>monitor</CODE> - progress monitor |
| <DT><B>Returns:</B><DD>created <CODE>ASTNode</CODE> instance</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getFieldDeclaration(org.eclipse.jdt.core.IField, org.eclipse.jdt.core.dom.TypeDeclaration)"><!-- --></A><H3> |
| getFieldDeclaration</H3> |
| <PRE> |
| public org.eclipse.jdt.core.dom.FieldDeclaration <B>getFieldDeclaration</B>(org.eclipse.jdt.core.IField fieldType, |
| org.eclipse.jdt.core.dom.TypeDeclaration typeDeclaration)</PRE> |
| <DL> |
| <DD>Finds <CODE>FieldDeclaration</CODE> in <CODE>TypeDeclaration</CODE> with name <code>fieldType.getElementName()</code>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>fieldType</CODE> - <DD><CODE>typeDeclaration</CODE> - |
| <DT><B>Returns:</B><DD>found object or <code>null</code></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getTypeSignature(org.eclipse.jdt.core.dom.SingleVariableDeclaration)"><!-- --></A><H3> |
| getTypeSignature</H3> |
| <PRE> |
| public java.lang.String <B>getTypeSignature</B>(org.eclipse.jdt.core.dom.SingleVariableDeclaration svDecl)</PRE> |
| <DL> |
| <DD>Retrieves type signature from <CODE>SingleVariableDeclaration</CODE>. As <CODE>SingleVariableDeclaration</CODE> returns only the clean type in case |
| declaration of type <tt>int paraArr[][]</tt> is in code the method adds array identifiers for type declaration int this case. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>svDecl</CODE> - |
| <DT><B>Returns:</B><DD>the signatyre for the type</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getMethodDeclaration(org.eclipse.jdt.core.IMethod, org.eclipse.jdt.core.dom.TypeDeclaration)"><!-- --></A><H3> |
| getMethodDeclaration</H3> |
| <PRE> |
| public org.eclipse.jdt.core.dom.MethodDeclaration <B>getMethodDeclaration</B>(org.eclipse.jdt.core.IMethod methodType, |
| org.eclipse.jdt.core.dom.TypeDeclaration typeDeclaration)</PRE> |
| <DL> |
| <DD>Finds <CODE>MethodDeclaration</CODE> in <CODE>TypeDeclaration</CODE> having name <code>methodType.getElementName()</code>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>methodType</CODE> - <DD><CODE>typeDeclaration</CODE> - |
| <DT><B>Returns:</B><DD>found object or <code>null</code></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getTypeDeclaration(java.lang.String, org.eclipse.jdt.core.dom.CompilationUnit)"><!-- --></A><H3> |
| getTypeDeclaration</H3> |
| <PRE> |
| public org.eclipse.jdt.core.dom.AbstractTypeDeclaration <B>getTypeDeclaration</B>(java.lang.String className, |
| org.eclipse.jdt.core.dom.CompilationUnit unit)</PRE> |
| <DL> |
| <DD>Retrieves <CODE>TypeDeclaration</CODE> from <CODE>CompilationUnit</CODE> with name <tt>className</tt> |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>className</CODE> - <DD><CODE>unit</CODE> - |
| <DT><B>Returns:</B><DD>found <CODE>TypeDeclaration</CODE> or <code>null</code></DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ASTUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| PREV CLASS |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../../../index.html?org/eclipse/jst/ws/jaxws/utils/clazz/ASTUtils.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="ASTUtils.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| |
| </BODY> |
| </HTML> |