blob: 9ad6a879090d7a060a332b8a4958aaea6efbe209 [file] [log] [blame]
<!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_24) on Sun Apr 03 10:57:50 IST 2011 -->
<TITLE>
JDTUtils
</TITLE>
<META NAME="date" CONTENT="2011-04-03">
<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="JDTUtils";
}
}
</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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JDTUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/WSDLUtils.html" title="class in org.eclipse.jst.ws.jaxws.core.utils"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../index.html?org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JDTUtils.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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.core.utils</FONT>
<BR>
Class JDTUtils</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../../../resources/inherit.gif" ALT="extended by "><B>org.eclipse.jst.ws.jaxws.core.utils.JDTUtils</B>
</PRE>
<HR>
<DL>
<DT><PRE>public final class <B>JDTUtils</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
JDT Utility class.
<p>
<strong>Provisional API:</strong> This class/interface is part of an interim API that is still under
development and expected to change significantly before reaching stability. It is being made available at
this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses
this API will almost certainly be broken (repeatedly) as the API evolves.
</p>
<P>
<P>
<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>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#addToClasspath(org.eclipse.jdt.core.IJavaProject, org.eclipse.jdt.core.IClasspathEntry)">addToClasspath</A></B>(org.eclipse.jdt.core.IJavaProject&nbsp;javaProject,
org.eclipse.jdt.core.IClasspathEntry&nbsp;classpathEntry)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a <code>IClasspathEntry</code> to a <code>IJavaProject</code></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.jdt.core.IType</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#findType(org.eclipse.jdt.core.IJavaProject, java.lang.String)">findType</A></B>(org.eclipse.jdt.core.IJavaProject&nbsp;javaProject,
java.lang.String&nbsp;fullyQualifiedClassName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the first type found following the given java project's classpath with the given fully qualified name or null if none is found.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.jdt.core.IType</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#findType(java.lang.String, java.lang.String)">findType</A></B>(java.lang.String&nbsp;projectName,
java.lang.String&nbsp;fullyQualifiedClassName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the first type found with the given fully qualified name following the classpath of the java project with
the give project name or null if none is found.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.jdt.core.IJavaProject</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#getJavaProject(java.lang.String)">getJavaProject</A></B>(java.lang.String&nbsp;projectName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Java project corresponding to the given project name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.core.runtime.IPath</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#getJavaProjectOutputDirectoryPath(org.eclipse.jdt.core.IJavaProject)">getJavaProjectOutputDirectoryPath</A></B>(org.eclipse.jdt.core.IJavaProject&nbsp;javaProject)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the absolute path in the local file system of the default output location for the given java project.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.core.runtime.IPath</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#getJavaProjectOutputDirectoryPath(java.lang.String)">getJavaProjectOutputDirectoryPath</A></B>(java.lang.String&nbsp;projectName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the absolute path in the local file system of the default output location for the given java project name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.core.runtime.IPath</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#getJavaProjectSourceDirectoryPath(org.eclipse.jdt.core.IJavaProject)">getJavaProjectSourceDirectoryPath</A></B>(org.eclipse.jdt.core.IJavaProject&nbsp;javaProject)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the full, absolute path relative to the workspace of the first source folder found in the given java project.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.core.runtime.IPath</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#getJavaProjectSourceDirectoryPath(org.eclipse.jdt.core.IType)">getJavaProjectSourceDirectoryPath</A></B>(org.eclipse.jdt.core.IType&nbsp;type)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the full, absolute path relative to the workspace of the source folder that contains the given type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.core.runtime.IPath</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#getJavaProjectSourceDirectoryPath(java.lang.String)">getJavaProjectSourceDirectoryPath</A></B>(java.lang.String&nbsp;projectName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the full, absolute path relative to the workspace of the first source folder found in the java project with the given name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.jdt.core.IMethod[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#getPublicMethods(org.eclipse.jdt.core.IType)">getPublicMethods</A></B>(org.eclipse.jdt.core.IType&nbsp;type)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the given <code>IType</code> is an interface all methods declared in that interface are returned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#getTargetNamespaceFromPackageName(java.lang.String)">getTargetNamespaceFromPackageName</A></B>(java.lang.String&nbsp;packageName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a target namespace string from the given package name by splitting the dot '.' separated
package name, reversing the order of the package name segments followed by prefixing the string with
'http://' and appending a forward slash '/' to the end.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#isJavaProject(org.eclipse.core.resources.IProject)">isJavaProject</A></B>(org.eclipse.core.resources.IProject&nbsp;project)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the given project has the java nature.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#isPublicMethod(org.eclipse.jdt.core.IMethod)">isPublicMethod</A></B>(org.eclipse.jdt.core.IMethod&nbsp;method)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the given method isn't a main method or constructor and if it has the public modifier.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#removeFromClasspath(org.eclipse.jdt.core.IJavaProject, org.eclipse.jdt.core.IClasspathEntry)">removeFromClasspath</A></B>(org.eclipse.jdt.core.IJavaProject&nbsp;javaProject,
org.eclipse.jdt.core.IClasspathEntry&nbsp;classpathEntry)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove a <code>IClasspathEntry</code> from a <code>IJavaProject</code></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.core.runtime.IStatus</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#validateIdentifier(java.lang.String)">validateIdentifier</A></B>(java.lang.String&nbsp;id)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Validates the given Java identifier with the workspace source and compliance levels.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.core.runtime.IStatus</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#validateJavaTypeName(java.lang.String)">validateJavaTypeName</A></B>(java.lang.String&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Validates the given Java type name, either simple or qualified, using the workspace source and compliance levels.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.core.runtime.IStatus</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#validateJavaTypeName(java.lang.String, java.lang.String)">validateJavaTypeName</A></B>(java.lang.String&nbsp;projectName,
java.lang.String&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Validates the given Java type name, either simple or qualified, using the given projects source and compliance levels.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.eclipse.core.runtime.IStatus</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html#validatePackageName(java.lang.String, java.lang.String)">validatePackageName</A></B>(java.lang.String&nbsp;projectName,
java.lang.String&nbsp;packageName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Validate the given package name using the given projects source and compliance levels.</TD>
</TR>
</TABLE>
&nbsp;<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>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<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="addToClasspath(org.eclipse.jdt.core.IJavaProject, org.eclipse.jdt.core.IClasspathEntry)"><!-- --></A><H3>
addToClasspath</H3>
<PRE>
public static void <B>addToClasspath</B>(org.eclipse.jdt.core.IJavaProject&nbsp;javaProject,
org.eclipse.jdt.core.IClasspathEntry&nbsp;classpathEntry)</PRE>
<DL>
<DD>Add a <code>IClasspathEntry</code> to a <code>IJavaProject</code>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>javaProject</CODE> - the <code>IJavaProject</code> to add the classpath entry to<DD><CODE>classpathEntry</CODE> - the <code>IClasspathEntry</code> to add</DL>
</DD>
</DL>
<HR>
<A NAME="removeFromClasspath(org.eclipse.jdt.core.IJavaProject, org.eclipse.jdt.core.IClasspathEntry)"><!-- --></A><H3>
removeFromClasspath</H3>
<PRE>
public static void <B>removeFromClasspath</B>(org.eclipse.jdt.core.IJavaProject&nbsp;javaProject,
org.eclipse.jdt.core.IClasspathEntry&nbsp;classpathEntry)</PRE>
<DL>
<DD>Remove a <code>IClasspathEntry</code> from a <code>IJavaProject</code>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>javaProject</CODE> - the <code>IJavaProject</code> to remove the classpath entry from<DD><CODE>classpathEntry</CODE> - the <code>IClasspathEntry</code> to remove</DL>
</DD>
</DL>
<HR>
<A NAME="getJavaProject(java.lang.String)"><!-- --></A><H3>
getJavaProject</H3>
<PRE>
public static org.eclipse.jdt.core.IJavaProject <B>getJavaProject</B>(java.lang.String&nbsp;projectName)</PRE>
<DL>
<DD>Returns the Java project corresponding to the given project name.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>projectName</CODE> - the project name
<DT><B>Returns:</B><DD>the Java project corresponding to the given project name</DL>
</DD>
</DL>
<HR>
<A NAME="getJavaProjectOutputDirectoryPath(org.eclipse.jdt.core.IJavaProject)"><!-- --></A><H3>
getJavaProjectOutputDirectoryPath</H3>
<PRE>
public static org.eclipse.core.runtime.IPath <B>getJavaProjectOutputDirectoryPath</B>(org.eclipse.jdt.core.IJavaProject&nbsp;javaProject)</PRE>
<DL>
<DD>Returns the absolute path in the local file system of the default output location for the given java project.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>javaProject</CODE> - the java project
<DT><B>Returns:</B><DD>the absolute path of the default output folder for the given java project</DL>
</DD>
</DL>
<HR>
<A NAME="getJavaProjectOutputDirectoryPath(java.lang.String)"><!-- --></A><H3>
getJavaProjectOutputDirectoryPath</H3>
<PRE>
public static org.eclipse.core.runtime.IPath <B>getJavaProjectOutputDirectoryPath</B>(java.lang.String&nbsp;projectName)</PRE>
<DL>
<DD>Returns the absolute path in the local file system of the default output location for the given java project name.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>projectName</CODE> - the name of the java project
<DT><B>Returns:</B><DD>the absolute path of the default output folder for the given java project name</DL>
</DD>
</DL>
<HR>
<A NAME="getJavaProjectSourceDirectoryPath(org.eclipse.jdt.core.IType)"><!-- --></A><H3>
getJavaProjectSourceDirectoryPath</H3>
<PRE>
public static org.eclipse.core.runtime.IPath <B>getJavaProjectSourceDirectoryPath</B>(org.eclipse.jdt.core.IType&nbsp;type)</PRE>
<DL>
<DD>Returns the full, absolute path relative to the workspace of the source folder that contains the given type.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - the <code>IType</code>
<DT><B>Returns:</B><DD>the absolute path of the given <code>IType</code> source folder</DL>
</DD>
</DL>
<HR>
<A NAME="getJavaProjectSourceDirectoryPath(java.lang.String)"><!-- --></A><H3>
getJavaProjectSourceDirectoryPath</H3>
<PRE>
public static org.eclipse.core.runtime.IPath <B>getJavaProjectSourceDirectoryPath</B>(java.lang.String&nbsp;projectName)</PRE>
<DL>
<DD>Returns the full, absolute path relative to the workspace of the first source folder found in the java project with the given name.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>projectName</CODE> - the name of the java project
<DT><B>Returns:</B><DD>the absolute path of the first source folder found in the java project with the given name.</DL>
</DD>
</DL>
<HR>
<A NAME="getJavaProjectSourceDirectoryPath(org.eclipse.jdt.core.IJavaProject)"><!-- --></A><H3>
getJavaProjectSourceDirectoryPath</H3>
<PRE>
public static org.eclipse.core.runtime.IPath <B>getJavaProjectSourceDirectoryPath</B>(org.eclipse.jdt.core.IJavaProject&nbsp;javaProject)</PRE>
<DL>
<DD>Returns the full, absolute path relative to the workspace of the first source folder found in the given java project.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>javaProject</CODE> - the <code>IJavaProject</code>
<DT><B>Returns:</B><DD>the absolute path of the first source folder found in the given java project.</DL>
</DD>
</DL>
<HR>
<A NAME="getPublicMethods(org.eclipse.jdt.core.IType)"><!-- --></A><H3>
getPublicMethods</H3>
<PRE>
public static org.eclipse.jdt.core.IMethod[] <B>getPublicMethods</B>(org.eclipse.jdt.core.IType&nbsp;type)</PRE>
<DL>
<DD>If the given <code>IType</code> is an interface all methods declared in that interface are returned.
<p>
Alternatively if the given given <code>IType</code> is a class, only methods that are explicitly marked
public are returned.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - the <code>IType</code>
<DT><B>Returns:</B><DD>the public methods declared in this type</DL>
</DD>
</DL>
<HR>
<A NAME="getTargetNamespaceFromPackageName(java.lang.String)"><!-- --></A><H3>
getTargetNamespaceFromPackageName</H3>
<PRE>
public static java.lang.String <B>getTargetNamespaceFromPackageName</B>(java.lang.String&nbsp;packageName)</PRE>
<DL>
<DD>Constructs a target namespace string from the given package name by splitting the dot '.' separated
package name, reversing the order of the package name segments followed by prefixing the string with
'http://' and appending a forward slash '/' to the end.
<p>E.g., the Java package Òcom.example.wsÓ would return the target namespace Òhttp://ws.example.com/Ó.</p>
<p>If the package name is null or is of zero length "http://default_package/" is returned.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>packageName</CODE> - the package name
<DT><B>Returns:</B><DD>the derived target namespace</DL>
</DD>
</DL>
<HR>
<A NAME="findType(org.eclipse.jdt.core.IJavaProject, java.lang.String)"><!-- --></A><H3>
findType</H3>
<PRE>
public static org.eclipse.jdt.core.IType <B>findType</B>(org.eclipse.jdt.core.IJavaProject&nbsp;javaProject,
java.lang.String&nbsp;fullyQualifiedClassName)</PRE>
<DL>
<DD>Returns the first type found following the given java project's classpath with the given fully qualified name or null if none is found.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>javaProject</CODE> - the given <code>IJavaProject</code><DD><CODE>fullyQualifiedClassName</CODE> - the given fully qualified name
<DT><B>Returns:</B><DD>the first type found following the java project's classpath with the given fully qualified name or null if none is found</DL>
</DD>
</DL>
<HR>
<A NAME="findType(java.lang.String, java.lang.String)"><!-- --></A><H3>
findType</H3>
<PRE>
public static org.eclipse.jdt.core.IType <B>findType</B>(java.lang.String&nbsp;projectName,
java.lang.String&nbsp;fullyQualifiedClassName)</PRE>
<DL>
<DD>Returns the first type found with the given fully qualified name following the classpath of the java project with
the give project name or null if none is found.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>projectName</CODE> - the name of the java project<DD><CODE>fullyQualifiedClassName</CODE> - the given fully qualified name
<DT><B>Returns:</B><DD>the first type found following the java project's classpath with the given fully qualified name or null if none is found</DL>
</DD>
</DL>
<HR>
<A NAME="isJavaProject(org.eclipse.core.resources.IProject)"><!-- --></A><H3>
isJavaProject</H3>
<PRE>
public static boolean <B>isJavaProject</B>(org.eclipse.core.resources.IProject&nbsp;project)</PRE>
<DL>
<DD>Returns whether the given project has the java nature.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>project</CODE> - the given project
<DT><B>Returns:</B><DD><code>true</code> if the project has the java nature</DL>
</DD>
</DL>
<HR>
<A NAME="isPublicMethod(org.eclipse.jdt.core.IMethod)"><!-- --></A><H3>
isPublicMethod</H3>
<PRE>
public static boolean <B>isPublicMethod</B>(org.eclipse.jdt.core.IMethod&nbsp;method)</PRE>
<DL>
<DD>Returns true if the given method isn't a main method or constructor and if it has the public modifier.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>method</CODE> - the given method
<DT><B>Returns:</B><DD><code>true</code> if the given method is public</DL>
</DD>
</DL>
<HR>
<A NAME="validateJavaTypeName(java.lang.String)"><!-- --></A><H3>
validateJavaTypeName</H3>
<PRE>
public static org.eclipse.core.runtime.IStatus <B>validateJavaTypeName</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Validates the given Java type name, either simple or qualified, using the workspace source and compliance levels.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of a type
<DT><B>Returns:</B><DD>a status object with code IStatus.OK if the given name is valid as a Java type name, a status with
code IStatus.WARNING indicating why the given name is discouraged, otherwise a status object indicating what is wrong with the name</DL>
</DD>
</DL>
<HR>
<A NAME="validateJavaTypeName(java.lang.String, java.lang.String)"><!-- --></A><H3>
validateJavaTypeName</H3>
<PRE>
public static org.eclipse.core.runtime.IStatus <B>validateJavaTypeName</B>(java.lang.String&nbsp;projectName,
java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Validates the given Java type name, either simple or qualified, using the given projects source and compliance levels.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>projectName</CODE> - the name of the java project<DD><CODE>name</CODE> - the name of a type
<DT><B>Returns:</B><DD>a status object with code IStatus.OK if the given name is valid as a Java type name, a status with
code IStatus.WARNING indicating why the given name is discouraged, otherwise a status object indicating what is wrong with the name</DL>
</DD>
</DL>
<HR>
<A NAME="validatePackageName(java.lang.String, java.lang.String)"><!-- --></A><H3>
validatePackageName</H3>
<PRE>
public static org.eclipse.core.runtime.IStatus <B>validatePackageName</B>(java.lang.String&nbsp;projectName,
java.lang.String&nbsp;packageName)</PRE>
<DL>
<DD>Validate the given package name using the given projects source and compliance levels.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>projectName</CODE> - the name of the java project<DD><CODE>packageName</CODE> - the name of a package
<DT><B>Returns:</B><DD>a status object with code IStatus.OK if the given name is valid as a package name, otherwise a status
object indicating what is wrong with the name</DL>
</DD>
</DL>
<HR>
<A NAME="validateIdentifier(java.lang.String)"><!-- --></A><H3>
validateIdentifier</H3>
<PRE>
public static org.eclipse.core.runtime.IStatus <B>validateIdentifier</B>(java.lang.String&nbsp;id)</PRE>
<DL>
<DD>Validates the given Java identifier with the workspace source and compliance levels.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - the Java identifier
<DT><B>Returns:</B><DD>a status object with code IStatus.OK if the given identifier is a valid Java identifier, otherwise
a status object indicating what is wrong with the identifier</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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JDTUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../../org/eclipse/jst/ws/jaxws/core/utils/WSDLUtils.html" title="class in org.eclipse.jst.ws.jaxws.core.utils"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../index.html?org/eclipse/jst/ws/jaxws/core/utils/JDTUtils.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JDTUtils.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>