Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] Best way to resolve qualified name as type or package

JDT Dev,


From a org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope, what is the best way to look up a qualified name like "foo.bar.baz" to determine if it is a type or a package (or neither)?  What I have been doing is calling org.eclipse.jdt.internal.compiler.lookup.Scope.getType(char[][], int).  However, if the given name is a package, this will pollute the PackageBinding with a MissingTypeBinding.  This prevents me from resolving "foo.bar.baz" in the future to a package.


I looked at the public API on CompUnitScope and there are a lot of things that say don't call this, it's for something else.  So I thought I would check with the mail list.  Thanks for your time.


Eric M.


Back to the top