1 11 package org.eclipse.jdt.internal.corext.util; 12 13 import org.eclipse.core.runtime.IPath; 14 import org.eclipse.core.runtime.Path; 15 16 import org.eclipse.core.resources.IResource; 17 18 import org.eclipse.jdt.core.IJavaElement; 19 import org.eclipse.jdt.core.search.IJavaSearchScope; 20 21 25 public class UnresolvableTypeInfo extends TypeInfo { 26 27 private final String fPath; 28 29 public UnresolvableTypeInfo(String pkg, String name, char[][] enclosingTypes, int modifiers, String path) { 30 super(pkg, name, enclosingTypes, modifiers); 31 fPath= path; 32 } 33 34 public boolean equals(Object obj) { 35 if (!UnresolvableTypeInfo.class.equals(obj.getClass())) 36 return false; 37 UnresolvableTypeInfo other= (UnresolvableTypeInfo)obj; 38 return doEquals(other) && fPath.equals(other.fPath); 39 } 40 41 public int getElementType() { 42 return TypeInfo.UNRESOLVABLE_TYPE_INFO; 43 } 44 45 public String getPath() { 46 return fPath; 47 } 48 49 public IPath getPackageFragmentRootPath() { 50 return new Path(fPath); 51 } 52 53 public String getPackageFragmentRootName() { 54 return fPath; 55 } 56 57 protected IJavaElement getContainer(IJavaSearchScope scope) { 58 return null; 59 } 60 61 public long getContainerTimestamp() { 62 return IResource.NULL_STAMP; 63 } 64 65 public boolean isContainerDirty() { 66 return false; 67 } 68 } 69 | Popular Tags |