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

CompositePathResourceBase (NetBeans Java Support APIs) - NetBeans API Javadoc 5.0.0

 

org.netbeans.spi.java.classpath.support
Class CompositePathResourceBase

java.lang.Object
  extended byorg.netbeans.spi.java.classpath.support.CompositePathResourceBase
All Implemented Interfaces:
PathResourceImplementation

public abstract class CompositePathResourceBase
extends Object
implements PathResourceImplementation

This class provides a base class for PathResource implementations

Since:
org.netbeans.api.java/1 1.4

Field Summary
 
Fields inherited from interface org.netbeans.spi.java.classpath.PathResourceImplementation
PROP_ROOTS
 
Constructor Summary
CompositePathResourceBase()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds property change listener.
protected abstract  ClassPathImplementation createContent()
          Creates the array of the roots of PathResource.
protected  void firePropertyChange(String propName, Object oldValue, Object newValue)
          Fires PropertyChangeEvent
 ClassPathImplementation getContent()
          Returns the ClassPathImplementation representing the content of this PathResourceImplementation
 URL[] getRoots()
          Returns the roots of the PathResource
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes PropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositePathResourceBase

public CompositePathResourceBase()
Method Detail

getRoots

public final URL[] getRoots()
Returns the roots of the PathResource

Specified by:
getRoots in interface PathResourceImplementation
Returns:
URL[]

getContent

public final ClassPathImplementation getContent()
Returns the ClassPathImplementation representing the content of this PathResourceImplementation

Specified by:
getContent in interface PathResourceImplementation
Returns:
ClassPathImplementation

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener listener)
Adds property change listener. The listener is notified when the roots of the PathResource are changed.

Specified by:
addPropertyChangeListener in interface PathResourceImplementation
Parameters:
listener -

removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener listener)
Removes PropertyChangeListener

Specified by:
removePropertyChangeListener in interface PathResourceImplementation
Parameters:
listener -

firePropertyChange

protected final void firePropertyChange(String propName,
                                        Object oldValue,
                                        Object newValue)
Fires PropertyChangeEvent

Parameters:
propName - name of property
oldValue - old property value or null
newValue - new property value or null

createContent

protected abstract ClassPathImplementation createContent()
Creates the array of the roots of PathResource. Most PathResource (directory, jar) have single root, but the PathResource can have more than one root to represent more complex resources like libraries. The returned value is cached.

Returns:
ClassPathImplementation

 

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