当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
ClassPathSourceCache (Java EE Metadata) - NetBeans API Javadoc (Current Development Version)
org.netbeans.modules.j2ee.metadata
Class ClassPathSourceCache
java.lang.Object
org.netbeans.modules.j2ee.metadata.ClassPathSourceCache
public class ClassPathSourceCache
- extends Object
Wrapper for a ClassPath whose contains(FileObject)
method
will also search any source roots for the classpath's binary roots.
Implemented as a cache because the trivial approach (retrieving
the source roots whenever contains()
is called)
is much slower.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROP_ROOTS
public static final String PROP_ROOTS
- See Also:
- Constant Field Values
newInstance
public static ClassPathSourceCache newInstance(ClassPath classPath,
boolean resolveSources)
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
contains
public boolean contains(FileObject f)
- Returns true if the roots returned by
getRoots()
contain
the specified FileObject
.
- Parameters:
f
- the file to search for.
- Returns:
- true if
f
could be find on any source root;
false otherwise.
getRoots
public FileObject[] getRoots()