站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

ClassPathSourceCache (Java EE Metadata) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.j2ee.metadata/0 1.3

org.netbeans.modules.j2ee.metadata
Class ClassPathSourceCache

java.lang.Object
  extended by 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.


Field Summary
static String PROP_ROOTS
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 boolean contains(FileObject f)
          Returns true if the roots returned by getRoots() contain the specified FileObject.
 FileObject[] getRoots()
           
static ClassPathSourceCache newInstance(ClassPath classPath, boolean resolveSources)
           
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_ROOTS

public static final String PROP_ROOTS
See Also:
Constant Field Values
Method Detail

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()

org.netbeans.modules.j2ee.metadata/0 1.3

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.