Adapt BasicProxyFactoryImpl to be more native-image friendly

Description

This relates to Quarkus issue:

We can easily avoid registering the proxy for reflection by holding a reference to the constructor rather than to the Class instance of the generated proxy. Proxies are generated during augmentation and since each BasicProxyFactoryImpl instance holds a reference to the matching constructor, GraalVM's native-image can figure it out.

This will need to be followed by integration tests in Quarkus.

BTW I suspect this also represents a more general efficiency optimisation.

Environment

None
Fixed

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Fix versions