01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.core.builder;
11:
12: import org.eclipse.core.resources.*;
13: import org.eclipse.core.runtime.*;
14:
15: import org.eclipse.jdt.internal.compiler.env.AccessRuleSet;
16: import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer;
17:
18: public abstract class ClasspathLocation {
19:
20: static ClasspathLocation forSourceFolder(IContainer sourceFolder,
21: IContainer outputFolder, char[][] inclusionPatterns,
22: char[][] exclusionPatterns) {
23: return new ClasspathMultiDirectory(sourceFolder, outputFolder,
24: inclusionPatterns, exclusionPatterns);
25: }
26:
27: public static ClasspathLocation forBinaryFolder(
28: IContainer binaryFolder, boolean isOutputFolder,
29: AccessRuleSet accessRuleSet) {
30: return new ClasspathDirectory(binaryFolder, isOutputFolder,
31: accessRuleSet);
32: }
33:
34: static ClasspathLocation forLibrary(String libraryPathname,
35: long lastModified, AccessRuleSet accessRuleSet) {
36: return new ClasspathJar(libraryPathname, lastModified,
37: accessRuleSet);
38: }
39:
40: static ClasspathLocation forLibrary(String libraryPathname,
41: AccessRuleSet accessRuleSet) {
42: return forLibrary(libraryPathname, 0, accessRuleSet);
43: }
44:
45: static ClasspathLocation forLibrary(IFile library,
46: AccessRuleSet accessRuleSet) {
47: return new ClasspathJar(library, accessRuleSet);
48: }
49:
50: public abstract NameEnvironmentAnswer findClass(
51: String binaryFileName, String qualifiedPackageName,
52: String qualifiedBinaryFileName);
53:
54: public abstract IPath getProjectRelativePath();
55:
56: public boolean isOutputFolder() {
57: return false;
58: }
59:
60: public abstract boolean isPackage(String qualifiedPackageName);
61:
62: public void cleanup() {
63: // free anything which is not required when the state is saved
64: }
65:
66: public void reset() {
67: // reset any internal caches before another compile loop starts
68: }
69:
70: public abstract String debugPathString();
71:
72: }
|