Using Java Annotation Processors I have the following type:
@NameToken(value={"startPage"})
public interface MyProxy extends Proxy<StartPagePresenter> {
}
and:
public interface Proxy<T> { }
I have the TypeElement
of Proxy
as:
TypeElement pProxyTypeElement = // ...
Now I want to get the TypeElement of the Type Parameter <StartPagePresenter>
.
I tried:
List<? extends TypeParameterElement> proxyTypeParamElems =
proxyTypeElement.getTypeParameters();
TypeParameterElement firstParameter = proxyTypeParamElems.get(0);
When I print firstParameter.getSimpleName()
I get T
instead of StartPagePresenter
.
How do I get the real TypeElement
StartPagePresenter from the TypeParameter?