KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > apt > core > internal > ExtJarFactoryContainer


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 BEA Systems, Inc.
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  * wharley@bea.com - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.jdt.apt.core.internal;
13
14 import java.io.File JavaDoc;
15
16 /**
17  * Annotation processor factory container based on a jar file
18  * outside the workspace, referenced by absolute path.
19  */

20 public class ExtJarFactoryContainer extends JarFactoryContainer {
21     private String JavaDoc _id;
22     private File JavaDoc _jarFile;
23     
24     /**
25      * @param jar must not be null
26      */

27     public ExtJarFactoryContainer(File JavaDoc jar) {
28         _jarFile = jar.getAbsoluteFile();
29         _id = _jarFile.getPath(); // id of ExtJar is the absolute path
30
}
31
32     @Override JavaDoc
33     public FactoryType getType() {
34         return FactoryType.EXTJAR;
35     }
36
37     /* (non-Javadoc)
38      * @see org.eclipse.jdt.apt.core.internal.JarFactoryContainer#getJarFile()
39      */

40     @Override JavaDoc
41     public File JavaDoc getJarFile() {
42         return _jarFile;
43     }
44
45     /* (non-Javadoc)
46      * @see org.eclipse.jdt.apt.core.FactoryContainer#getId()
47      */

48     @Override JavaDoc
49     public String JavaDoc getId() {
50         return _id;
51     }
52 }
53
Popular Tags