pkgName = new String[length];
System.arraycopy(simpleNames, 0, pkgName, 0, length);
} else {
pkgName = CharOperation.NO_STRINGS;
}
IPackageFragment pkgFragment= (IPackageFragment) this.packageHandles.get(pkgName);
if (pkgFragment == null) {
pkgFragment= ((PackageFragmentRoot) this.lastPkgFragmentRoot).getPackageFragment(pkgName);
this.packageHandles.put(pkgName, pkgFragment);
}
String simpleName= simpleNames[length];
if (org.aspectj.org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(simpleName)) {
ICompilationUnit unit= pkgFragment.getCompilationUnit(simpleName);
int etnLength = enclosingTypeNames == null ? 0 : enclosingTypeNames.length;
IType type = (etnLength == 0) ? unit.getType(simpleTypeName) : unit.getType(new String(enclosingTypeNames[0]));
if (etnLength > 0) {
for (int i=1; i<etnLength; i++) {
type = type.getType(new String(enclosingTypeNames[i]));
}
type = type.getType(simpleTypeName);
}
return type;
} else {
IClassFile classFile= pkgFragment.getClassFile(simpleName);
return classFile.getType();
}
}