|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.ide.util.JdtUtil
public class JdtUtil
Convenience methods to get information from JDT IJavaElement model.
| Constructor Summary | |
|---|---|
JdtUtil()
|
|
| Method Summary | |
|---|---|
static org.eclipse.jdt.core.IJavaElement |
createJavaElementFromJdtHandle(java.lang.String jdtHandle)
Deprecated. |
static org.eclipse.jdt.core.IType |
findJavaClassInProjects(java.lang.String fullyQualifiedName,
java.util.Collection<org.eclipse.jdt.core.IJavaProject> projects)
Find the IType in the workspace corresponding to a class name. |
static org.eclipse.jdt.core.IType |
findJavaClassInResources(java.lang.String className,
java.util.Collection<org.eclipse.core.resources.IResource> resources)
|
static org.eclipse.jdt.core.IMethod |
findJavaMethodInProjects(java.lang.String klass,
java.lang.String selector,
java.util.Collection<org.eclipse.jdt.core.IJavaProject> projects)
Find the IMethod in the workspace corresponding to a method selector. |
static org.eclipse.jdt.core.IMethod |
findJavaMethodInWorkspaceBrokenForInnerClasses(java.lang.String methodSig)
Deprecated. |
static java.util.Collection<org.eclipse.jdt.core.IMethod> |
findMethods(org.eclipse.jdt.core.IJavaElement elt)
Use the search engine to find all methods in a java element |
static org.eclipse.jdt.core.IType[] |
getClasses(org.eclipse.jdt.core.ICompilationUnit cu)
|
static java.lang.String |
getClassName(org.eclipse.jdt.core.IType type)
|
static java.lang.String |
getFilePath(org.eclipse.jdt.core.IJavaElement javaElt)
|
static java.lang.String |
getFullyQualifiedClassName(org.eclipse.jdt.core.IType type)
|
static java.lang.String |
getHumanReadableType(java.lang.String typeSignature)
|
static org.eclipse.jdt.core.IJavaProject |
getJavaProject(org.eclipse.core.resources.IFile appJar)
|
static org.eclipse.jdt.core.IJavaProject |
getJavaProject(java.lang.String projectName)
|
static java.lang.String |
getJdtHandleString(org.eclipse.jdt.core.IJavaElement javaElt)
Return a unique string representing the specified Java element across projects in the workspace. |
static org.eclipse.jdt.core.IJavaProject |
getNamedProject(java.lang.String projectName)
|
static java.lang.String |
getPackageName(org.eclipse.jdt.core.ICompilationUnit cu)
|
static org.eclipse.jdt.core.IJavaProject |
getProject(org.eclipse.jdt.core.IJavaElement javaElt)
|
static java.lang.String |
getProjectName(org.eclipse.jdt.core.IJavaProject javaProject)
|
static org.eclipse.jface.viewers.StructuredSelection |
getStructuredSelectionForProjectNames(java.util.Collection<java.lang.String> projectNames)
get a StructuredSelection corresponding to the named projects |
static java.util.Collection<java.lang.String> |
getTypeParameterNames(org.eclipse.jdt.core.IType type)
|
static java.util.Collection<org.eclipse.jdt.core.IJavaProject> |
getWorkspaceJavaProjects()
compute the java projects in the active workspace |
static java.lang.String |
parseForName(java.lang.String selector,
org.eclipse.jdt.core.IType type)
|
static java.lang.String[] |
parseForParameterTypes(java.lang.String selector)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JdtUtil()
| Method Detail |
|---|
public static java.lang.String getFilePath(org.eclipse.jdt.core.IJavaElement javaElt)
public static java.lang.String getPackageName(org.eclipse.jdt.core.ICompilationUnit cu)
public static java.lang.String getFullyQualifiedClassName(org.eclipse.jdt.core.IType type)
public static java.lang.String getClassName(org.eclipse.jdt.core.IType type)
public static java.lang.String getJdtHandleString(org.eclipse.jdt.core.IJavaElement javaElt)
javaElt -
java.lang.IllegalArgumentException - if javaElt is null@Deprecated public static org.eclipse.jdt.core.IJavaElement createJavaElementFromJdtHandle(java.lang.String jdtHandle)
public static org.eclipse.jdt.core.IType[] getClasses(org.eclipse.jdt.core.ICompilationUnit cu)
public static org.eclipse.jdt.core.IJavaProject getProject(org.eclipse.jdt.core.IJavaElement javaElt)
public static java.lang.String getProjectName(org.eclipse.jdt.core.IJavaProject javaProject)
public static java.lang.String getHumanReadableType(java.lang.String typeSignature)
typeSignature - Some of the type signatures examples are "QString;" (String) and "I" (int) The type signatures may be
either unresolved (for source types) or resolved (for binary types), and either basic (for basic types) or rich (for
parameterized types). See Signature for details.public static org.eclipse.jdt.core.IJavaProject getJavaProject(org.eclipse.core.resources.IFile appJar)
public static org.eclipse.jdt.core.IJavaProject getJavaProject(java.lang.String projectName)
public static java.util.Collection<org.eclipse.jdt.core.IJavaProject> getWorkspaceJavaProjects()
public static org.eclipse.jdt.core.IType findJavaClassInProjects(java.lang.String fullyQualifiedName,
java.util.Collection<org.eclipse.jdt.core.IJavaProject> projects)
throws java.lang.IllegalArgumentException
IType in the workspace corresponding to a class name.
java.lang.IllegalArgumentException - if projects == null
public static org.eclipse.jdt.core.IType findJavaClassInResources(java.lang.String className,
java.util.Collection<org.eclipse.core.resources.IResource> resources)
public static org.eclipse.jdt.core.IMethod findJavaMethodInProjects(java.lang.String klass,
java.lang.String selector,
java.util.Collection<org.eclipse.jdt.core.IJavaProject> projects)
public static java.util.Collection<java.lang.String> getTypeParameterNames(org.eclipse.jdt.core.IType type)
throws java.lang.IllegalArgumentException,
org.eclipse.jdt.core.JavaModelException
java.lang.IllegalArgumentException
org.eclipse.jdt.core.JavaModelException
public static java.lang.String parseForName(java.lang.String selector,
org.eclipse.jdt.core.IType type)
public static final java.lang.String[] parseForParameterTypes(java.lang.String selector)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException@Deprecated public static org.eclipse.jdt.core.IMethod findJavaMethodInWorkspaceBrokenForInnerClasses(java.lang.String methodSig)
public static java.util.Collection<org.eclipse.jdt.core.IMethod> findMethods(org.eclipse.jdt.core.IJavaElement elt)
public static org.eclipse.jface.viewers.StructuredSelection getStructuredSelectionForProjectNames(java.util.Collection<java.lang.String> projectNames)
StructuredSelection corresponding to the named projects
public static org.eclipse.jdt.core.IJavaProject getNamedProject(java.lang.String projectName)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||