KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > java > project > classpath > ProjectClassPathModifierAccessor


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.modules.java.project.classpath;
21
22 import java.io.IOException JavaDoc;
23 import java.net.URI JavaDoc;
24 import java.net.URL JavaDoc;
25 import org.netbeans.api.java.project.classpath.ProjectClassPathModifier;
26 import org.netbeans.api.project.SourceGroup;
27 import org.netbeans.api.project.ant.AntArtifact;
28 import org.netbeans.api.project.libraries.Library;
29 import org.netbeans.spi.java.project.classpath.ProjectClassPathModifierImplementation;
30 import org.openide.ErrorManager;
31
32 /**
33  *
34  * @author tom
35  */

36 public abstract class ProjectClassPathModifierAccessor {
37
38     public static ProjectClassPathModifierAccessor INSTANCE;
39     
40     static {
41         Class JavaDoc c = ProjectClassPathModifierImplementation.class;
42         try {
43             Class.forName (c.getName(), true, c.getClassLoader());
44         } catch (Exception JavaDoc ex) {
45             ErrorManager.getDefault().notify(ex);
46         }
47     }
48     
49     /** Creates a new instance of ProjectClassPathModifierAccessor */
50     public ProjectClassPathModifierAccessor() {
51     }
52     
53     public abstract SourceGroup[] getExtensibleSourceGroups (ProjectClassPathModifierImplementation m);
54     
55     public abstract String JavaDoc[] getExtensibleClassPathTypes (ProjectClassPathModifierImplementation m, SourceGroup sg);
56     
57     public abstract boolean addLibraries (Library[] libraries, ProjectClassPathModifierImplementation m, SourceGroup sourceGroup, String JavaDoc type) throws IOException JavaDoc, UnsupportedOperationException JavaDoc;
58                 
59     public abstract boolean removeLibraries (Library[] libraries, ProjectClassPathModifierImplementation m, SourceGroup sourceGroup, String JavaDoc type) throws IOException JavaDoc, UnsupportedOperationException JavaDoc;
60         
61     public abstract boolean addRoots (URL JavaDoc[] classPathRoots, ProjectClassPathModifierImplementation m, SourceGroup sourceGroup, String JavaDoc type) throws IOException JavaDoc, UnsupportedOperationException JavaDoc;
62        
63     public abstract boolean removeRoots (URL JavaDoc[] classPathRoots, ProjectClassPathModifierImplementation m, SourceGroup sourceGroup, String JavaDoc type) throws IOException JavaDoc, UnsupportedOperationException JavaDoc;
64     
65     public abstract boolean addAntArtifacts (AntArtifact[] artifacts, URI JavaDoc[] artifactElements, ProjectClassPathModifierImplementation m, SourceGroup sourceGroup, String JavaDoc type) throws IOException JavaDoc, UnsupportedOperationException JavaDoc;
66
67     public abstract boolean removeAntArtifacts (AntArtifact[] artifacts, URI JavaDoc[] artifactElements, ProjectClassPathModifierImplementation m, SourceGroup sourceGroup, String JavaDoc type) throws IOException JavaDoc, UnsupportedOperationException JavaDoc;
68     
69 }
70
Popular Tags