This is actually also fixed as part of the work I did for HCANN-69. Basically I converted this to just use Proxy#newProxyInstance rather than Proxy#getProxyClass and then doing relfection. Proxy#newProxyInstance handles alot of reflection details, the important one here likely being to set the constructor's visibility to public.
Overall I'd prefer to keep the semantic of allowing annotations to be defined with whatever visibility they want, and this code to be able to deal with it.
|