KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > spi > java > classpath > PathResourceImplementation


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.spi.java.classpath;
20
21 import java.beans.PropertyChangeListener JavaDoc;
22 import java.net.URL JavaDoc;
23
24 /**
25  * SPI interface for one classpath entry.
26  * @see ClassPathImplementation
27  * @since org.netbeans.api.java/1 1.4
28  */

29 public interface PathResourceImplementation {
30
31     public static final String JavaDoc PROP_ROOTS = "roots"; //NOI18N
32

33     /** Roots of the class path entry.
34      * In the case of simple resource it returns array containing just one URL.
35      * In the case of composite resource it returns array containing one or more URL.
36      * @return array of URL, never returns null.
37      */

38     public URL JavaDoc[] getRoots();
39
40     /**
41      * Returns ClassPathImplementation representing the content of the PathResourceImplementation.
42      * If the PathResourceImplementation represents leaf resource, it returns null.
43      * The ClassPathImplementation is live and can be used for path resource content
44      * modification.
45      * <p><strong>Semi-deprecated.</strong> There was never a real reason for this method to exist.
46      * If implementing <code>PathResourceImplementation</code> you can simply return null;
47      * it is unlikely anyone will call this method anyway.
48      * @return classpath handle in case of composite resource; null for leaf resource
49      */

50     public ClassPathImplementation getContent();
51
52     /**
53      * Adds property change listener.
54      * The listener is notified when the roots of the entry are changed.
55      * @param listener
56      */

57     public void addPropertyChangeListener(PropertyChangeListener JavaDoc listener);
58
59     /**
60      * Removes property change listener.
61      * @param listener
62      */

63     public void removePropertyChangeListener(PropertyChangeListener JavaDoc listener);
64
65 }
66
Popular Tags