KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > core > builder > ClasspathLocation


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.core.builder;
12
13 import org.eclipse.core.resources.*;
14 import org.eclipse.core.runtime.*;
15
16 import org.eclipse.jdt.internal.compiler.env.AccessRuleSet;
17 import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer;
18
19 public abstract class ClasspathLocation {
20
21 static ClasspathLocation forSourceFolder(IContainer sourceFolder, IContainer outputFolder, char[][] inclusionPatterns, char[][] exclusionPatterns) {
22     return new ClasspathMultiDirectory(sourceFolder, outputFolder, inclusionPatterns, exclusionPatterns);
23 }
24
25 public static ClasspathLocation forBinaryFolder(IContainer binaryFolder, boolean isOutputFolder, AccessRuleSet accessRuleSet) {
26     return new ClasspathDirectory(binaryFolder, isOutputFolder, accessRuleSet);
27 }
28
29 static ClasspathLocation forLibrary(String JavaDoc libraryPathname, long lastModified, AccessRuleSet accessRuleSet) {
30     return new ClasspathJar(libraryPathname, lastModified, accessRuleSet);
31 }
32
33 static ClasspathLocation forLibrary(String JavaDoc libraryPathname, AccessRuleSet accessRuleSet) {
34     return forLibrary(libraryPathname, 0, accessRuleSet);
35 }
36
37 static ClasspathLocation forLibrary(IFile library, AccessRuleSet accessRuleSet) {
38     return new ClasspathJar(library, accessRuleSet);
39 }
40
41 public abstract NameEnvironmentAnswer findClass(String JavaDoc binaryFileName, String JavaDoc qualifiedPackageName, String JavaDoc qualifiedBinaryFileName);
42
43 public abstract IPath getProjectRelativePath();
44
45 public boolean isOutputFolder() {
46     return false;
47 }
48
49 public abstract boolean isPackage(String JavaDoc qualifiedPackageName);
50
51 public void cleanup() {
52     // free anything which is not required when the state is saved
53
}
54 public void reset() {
55     // reset any internal caches before another compile loop starts
56
}
57
58 public abstract String JavaDoc debugPathString();
59
60 }
61
Popular Tags