Package com.iizigo.app
Class EclipseIProject
- java.lang.Object
- com.iizigo.app.EclipseIProject
- All Implemented Interfaces:
IIDirectory,IIResource
public class EclipseIProject extends java.lang.Object implements IIDirectory
The Eclipse project wrapper as a directory.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description EclipseIProject(org.eclipse.core.resources.IProject project)Constructs a file.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Compares two resources.java.io.FilegetFile(java.lang.Object monitor)Get the Java canonical File.java.lang.StringgetFullPath()Gets the full path to the resource.java.lang.StringgetName()Gets the name of the resource.inthashCode()The hash code.booleanisDirectory()Checks if this resource is a directory.java.util.List<IIResource>listDirectory(java.lang.Object monitor)Lists the contents of the directory.java.lang.StringtoString()Resource String representation is the file name.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.iizix.app.builder.IIResource
equals
Method Detail
getFullPath
public java.lang.String getFullPath() throws java.io.IOExceptionGets the full path to the resource.- Specified by:
getFullPathin interfaceIIResource- Throws:
java.io.IOException- For I/O errors.
getFile
public java.io.File getFile(java.lang.Object monitor) throws java.io.IOExceptionGet the Java canonical File.- Specified by:
getFilein interfaceIIResource- Parameters:
monitor- The IProgressMonitor, null for none.- Returns:
- a File in canonical form.
- Throws:
java.io.IOException- For I/O errors.
listDirectory
public java.util.List<IIResource> listDirectory(java.lang.Object monitor) throws java.io.IOException
Lists the contents of the directory.- Specified by:
listDirectoryin interfaceIIDirectory- Parameters:
monitor- The IProgressMonitor, null for none.- Throws:
java.io.IOException- For directory errors.
isDirectory
public boolean isDirectory()
Checks if this resource is a directory.- Specified by:
isDirectoryin interfaceIIResource- Returns:
- true.
getName
public java.lang.String getName()
Gets the name of the resource.- Specified by:
getNamein interfaceIIResource- Returns:
- The name of the resource (also includes the file extension).
equals
public boolean equals(java.lang.Object o)
Compares two resources.- Overrides:
equalsin classjava.lang.Object
hashCode
public int hashCode()
The hash code.- Overrides:
hashCodein classjava.lang.Object
toString
public java.lang.String toString()
Resource String representation is the file name.- Overrides:
toStringin classjava.lang.Object