KickJava   Java API By Example, From Geeks To Geeks.

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


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
20 package org.netbeans.spi.java.classpath;
21
22 import java.net.URL JavaDoc;
23
24 /**
25  * SPI interface for a classpath entry which can include or exclude particular files.
26  * @author Jesse Glick
27  * @see "issue #49026"
28  * @since org.netbeans.api.java/1 1.13
29  */

30 public interface FilteringPathResourceImplementation extends PathResourceImplementation {
31
32     /**
33      * Property name to fire in case {@link #includes} would change.
34      * (The old and new value should be left null.)
35      * <p>
36      * <strong>Special usage note:</strong>
37      * If multiple {@link FilteringPathResourceImplementation}s inside a single
38      * {@link ClassPathImplementation} fire changes in this pseudo-property in
39      * succession, all using the same non-null {@link java.beans.PropertyChangeEvent#setPropagationId},
40      * {@link org.netbeans.api.java.classpath.ClassPath#PROP_INCLUDES} will be fired just once. This can be used
41      * to prevent "event storms" from triggering excessive Java source root rescanning.
42      */

43     String JavaDoc PROP_INCLUDES = "includes"; // NOI18N
44

45     /**
46      * Determines whether a given resource is included in the classpath or not.
47      * @param root one of the roots given by {@link #getRoots} (else may throw {@link IllegalArgumentException})
48      * @param resource a relative resource path within that root; may refer to a file or slash-terminated folder; the empty string refers to the root itself
49      * @return true if included (or, in the case of a folder, at least partially included); false if excluded
50      */

51     boolean includes(URL JavaDoc root, String JavaDoc resource);
52
53 }
54
Popular Tags