KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > spi > java > project > classpath > support > ProjectClassPathSupport


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.project.classpath.support;
20
21 import java.io.File JavaDoc;
22 import org.netbeans.spi.java.classpath.ClassPathImplementation;
23 import org.netbeans.spi.project.support.ant.PropertyEvaluator;
24
25 /**
26  * ProjectClassPathSupport is a support class for creating classpath based
27  * on the list of ant properties.
28  * @since org.netbeans.modules.java.project/1 1.3
29  * @author Tomas Zezula
30  */

31 public class ProjectClassPathSupport {
32
33     /** Creates a new instance of NewClass */
34     private ProjectClassPathSupport() {
35     }
36
37
38     /**
39      * Creates new classpath based on the ant property. The returned classpath
40      * listens on changes of property value.
41      * @param projectFolder {@link File} the project folder used to resolve relative paths
42      * @param evaluator {@link PropertyEvaluator} used for obtaining the value of
43      * given property and listening on value changes.
44      * @param propertyNames the names of ant properties the classpath will be build on,
45      * can't be or contain null. It can contain duplicates, in this case the duplicated property
46      * is used multiple times. The values of given properties are concatenated into a single path.
47      * @return an {@link ClassPathImplementation} based on the given ant properties.
48      */

49     public static ClassPathImplementation createPropertyBasedClassPathImplementation (File JavaDoc projectFolder,
50             PropertyEvaluator evaluator, String JavaDoc[] propertyNames) {
51         return new ProjectClassPathImplementation (projectFolder, propertyNames, evaluator);
52     }
53     
54 }
55
Popular Tags