Java Project API/SPI

Jan Pokorsky <[email protected]> Tue, 22 Jul 2003 10:54:03 +0200
Newsgroups gmane.comp.java.netbeans.modules.projects.devel
Organization Sun Microsystems, Inc.
Message-ID <[email protected]>
Java Project API refinements:

In order to make the api classes less overcrowded with methods and to 
prevent future compatibility issues I would propose to split following 
classes to API and SPI part:

1. ProjectPath:
http://www.netbeans.org/download/prj40_prototype/javadoc/JavaProjectAPI/org/netbeans/api/java/project/ProjectPath.html

   API: the class should be final. Just static methods would remain.
   SPI: introduce
public abstract class AbstractProjectPath {
   public abstract PathResource handleCreateResource(FileObject filebase)
        throws IOException;
   public abstract ClassPath getPath(ProjectMember object, Object type);
}

where handleCreateResource() is moved from api.ProjectPath and 
spi.AbstractProjectPath.getPath() replaces 
api.ProjectPath.findPath(ProjectMember, Object)

2. JavaProject:
http://www.netbeans.org/download/prj40_prototype/javadoc/JavaProjectAPI/org/netbeans/api/java/project/JavaProject.html

   API: the class should be final. Remove needless support methods like 
fireXXX, listenerAttached.
   SPI: introduce public abstract class BasicJavaProject containing all 
support methods and those neccessary for proper functionality of the 
api.JavaProject.


Comments and objections are welcome.

Jan