From String signature to o.e.j.internal.compiler.lookup.TypeBinding? [message #1220250] |
Tue, 10 December 2013 10:54  |
Eclipse User |
|
|
|
Hi JDT committers,
from the InternalCompletionContext I fetch the expected type signature using getExpectedTypesSignatures().
To make efficient subtype tests, I need to convert these strings back to TypeBindings. This works nicely with LookupEnvironment.getType(splittedTypeSignature) but only for signatures that do not contain generics.
However, when I have a String like the one below, this fails. What is the most generic way to convert a String like "Ljava.util.List<Ljava.lang.String;>;" to a TypeBinding (given that I've access to the LookupEnvironment)?
Thanks for your hints,
Marcel
|
|
|
Re: From String signature to o.e.j.internal.compiler.lookup.TypeBinding? [message #1220261 is a reply to message #1220250] |
Tue, 10 December 2013 12:39   |
Eclipse User |
|
|
|
If you "invent" a few of the required argument values, you might be able to use
getTypeFromTypeSignature(SignatureWrapper,TypeVariableBinding[],ReferenceBinding,char[][][],TypeAnnotationWalker)
I guess that for your case most arguments can actually be null, but please verify.
Of course, class SignatureWrapper is internal, too, ...
HTH,
Stephan
|
|
|
|
Powered by
FUDForum. Page generated in 0.03591 seconds