1 11 12 package org.eclipse.jdt.apt.core.internal; 13 14 import java.io.File ; 15 16 import org.eclipse.core.runtime.IPath; 17 import org.eclipse.core.runtime.IStatus; 18 import org.eclipse.jdt.core.JavaCore; 19 20 24 public class VarJarFactoryContainer extends JarFactoryContainer { 25 26 private final String _id; 27 private final File _jarFile; 28 29 32 public VarJarFactoryContainer(IPath jarPath) { 33 _id = jarPath.toString(); 34 IPath resolved = JavaCore.getResolvedVariablePath(jarPath); 35 if (null != resolved) { 36 _jarFile = resolved.toFile(); 37 } 38 else { 39 _jarFile = null; 40 IStatus s = AptPlugin.createWarningStatus( 41 null, "The factorypath entry " + _id + " could not be resolved"); AptPlugin.log(s); 43 } 44 } 45 46 @Override 47 public FactoryType getType() { 48 return FactoryType.VARJAR; 49 } 50 51 54 @Override 55 public File getJarFile() { 56 return _jarFile; 57 } 58 59 62 @Override 63 public String getId() { 64 return _id; 65 } 66 } 67 | Popular Tags |