|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openide.filesystems.FileSystemCapability
This class defines the capabilities of a file system to take part in different operations. Some file systems are not designed to allow compilation on them, some do not want to be present in class path when executing or debugging a program.
Moreover there can be additional capabilities to check and this class defines ways how one can communicated with a file system to find out whether the system is "capable" enough to be used in the operation.
Inner Class Summary | |
static class |
FileSystemCapability.Bean
Default implementation of capabilities, that behaves like JavaBean and allows to set whether the well known capabilities (like compile, execute) should be enabled or not. |
Field Summary | |
static FileSystemCapability |
ALL
Object that is capable of every thing. |
static FileSystemCapability |
COMPILE
Well known capability of being compiled |
static FileSystemCapability |
DEBUG
Well known ability to be debugged |
static FileSystemCapability |
DOC
Well known ability to contain documentation files |
static FileSystemCapability |
EXECUTE
Well known ability to be executed |
Constructor Summary | |
FileSystemCapability()
|
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener l)
Adds PropertyChange listener. |
boolean |
capableOf(FileSystemCapability c)
Basic operation that tests whether this object is capable to do different capability. |
Enumeration |
fileSystems()
All filesystems that are capable of this capability. |
FileObject |
find(String aPackage,
String name,
String ext)
Finds file when its name is provided. |
Enumeration |
findAll(String aPackage,
String name,
String ext)
Finds all files among all file systems with this capability that match a given name, returning all matches. |
Enumeration |
findAllResources(String name)
Searches for the given resource among all file systems that satifies this capability, returning all matches. |
FileObject |
findResource(String resName)
Find a resource in repository, ignoring not capable file systems. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Removes PropertyChange listener. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final FileSystemCapability ALL
public static final FileSystemCapability COMPILE
public static final FileSystemCapability EXECUTE
public static final FileSystemCapability DEBUG
public static final FileSystemCapability DOC
Constructor Detail |
public FileSystemCapability()
Method Detail |
public boolean capableOf(FileSystemCapability c)
The default implementation claims that it is capable to handle only identical capability (==).
c
- capability to testpublic Enumeration fileSystems()
public FileObject findResource(String resName)
resName
- name of the resourcepublic Enumeration findAllResources(String name)
name
- name of the resourceFileObject
spublic final FileObject find(String aPackage, String name, String ext)
find
. The first object that is found is returned or null
if none of the file systems contain such a file.aPackage
- package name where each package is separated by a dotname
- name of the file (without dots) or null
if
one wants to obtain the name of a package and not a file in itext
- extension of the file or null
if one needs
a package and not a file nameFileObject
that represents file with given name or
null
if the file does not existpublic final Enumeration findAll(String aPackage, String name, String ext)
FileSystem.find(java.lang.String, java.lang.String, java.lang.String)
.aPackage
- package name where each package is separated by a dotname
- name of the file (without dots) or null
if
one wants to obtain the name of a package and not a file in itext
- extension of the file or null
if one needs
a package and not a file nameFileObject
spublic void addPropertyChangeListener(PropertyChangeListener l)
l
- the listener to be added.public void removePropertyChangeListener(PropertyChangeListener l)
l
- the listener to be removed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |