Composite Refactoring
v1.0

compositeRefactoring.resources
Class GetJavaResources

java.lang.Object
  |
  +--compositeRefactoring.resources.GetJavaResources

public class GetJavaResources
extends Object

GetJavaResources provides methods to fetch all relevant reources of a java project.


Constructor Summary
GetJavaResources()
          creates a new GetJavaResources object.
 
Method Summary
 ICompilationUnit getJavaCompilationUnit(IFile file)
          gets a compilation unit (a .java-file).
 ICompilationUnit getJavaCompilationUnit(String projName, String name)
          gets a compilation unit (a .java-file).
 ICompilationUnit getJavaCompilationUnit(String projName, String folderName, String name)
          gets a compilation unit (a .java-file).
 IPackageFragment getJavaPackage(IFolder folder)
          gets a java package.
 IPackageFragment getJavaPackage(String projName, String name)
          gets a java package.
 IJavaProject getJavaProject(IProject proj)
          gets a java project, the root of all java elements.
 IJavaProject getJavaProject(String name)
          gets a java project, the root of all java elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetJavaResources

public GetJavaResources()
creates a new GetJavaResources object.
Method Detail

getJavaProject

public IJavaProject getJavaProject(IProject proj)
gets a java project, the root of all java elements.
Parameters:
proj - the project file as stored on the filesystem.
Returns:
the java project

getJavaProject

public IJavaProject getJavaProject(String name)
gets a java project, the root of all java elements.
Parameters:
name - the name of the java project.
Returns:
the java project

getJavaPackage

public IPackageFragment getJavaPackage(IFolder folder)
gets a java package.
Parameters:
folder - the folder representing the package on the filesystem.
Returns:
the package fragment

getJavaPackage

public IPackageFragment getJavaPackage(String projName,
                                       String name)
gets a java package.
Parameters:
projName - the name of the project in which the java package is declared.
name - the name of the package.
Returns:
the package fragment

getJavaCompilationUnit

public ICompilationUnit getJavaCompilationUnit(IFile file)
gets a compilation unit (a .java-file).
Parameters:
file - the underlying resource file of the compilation unit as stored on the filesystem.
Returns:
the java compilation unit.

getJavaCompilationUnit

public ICompilationUnit getJavaCompilationUnit(String projName,
                                               String name)
gets a compilation unit (a .java-file).
Parameters:
projName - the name of the project in which the .java-file is declared.
name - the name of the compilation unit.
Returns:
the java compilation unit.

getJavaCompilationUnit

public ICompilationUnit getJavaCompilationUnit(String projName,
                                               String folderName,
                                               String name)
gets a compilation unit (a .java-file).
Parameters:
projName - the name of the project in which the .java-file is declared.
folderName - the name of the package in which the .java-file is declared.
name - the name of the compilation unit.
Returns:
the java compilation unit.

Composite Refactoring
v1.0