1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core.builder;
13 import net.sourceforge.phpdt.internal.compiler.env.NameEnvironmentAnswer;
15 import org.eclipse.core.resources.IContainer;
16 import org.eclipse.core.resources.IFile;
17 import org.eclipse.core.runtime.IPath;
19 public abstract class ClasspathLocation {
21 static ClasspathLocation forSourceFolder(IContainer sourceFolder, IContainer outputFolder, char[][] exclusionPatterns) {
22 return new ClasspathMultiDirectory(sourceFolder, outputFolder, exclusionPatterns);
25 public static ClasspathLocation forBinaryFolder(IContainer binaryFolder, boolean isOutputFolder) {
26 return new ClasspathDirectory(binaryFolder, isOutputFolder);
29 //static ClasspathLocation forLibrary(String libraryPathname) {
30 // return new ClasspathJar(libraryPathname);
33 //static ClasspathLocation forLibrary(IFile library) {
34 // return new ClasspathJar(library);
37 public abstract NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPackageName, String qualifiedBinaryFileName);
39 public abstract IPath getProjectRelativePath();
41 public boolean isOutputFolder() {
45 public abstract boolean isPackage(String qualifiedPackageName);
47 // free anything which is not required when the state is saved
48 public void cleanup() {
50 // reset any internal caches before another compile loop starts