Class AnnotationProxy

java.lang.Object
io.github.ascopes.protobufmavenplugin.utils.AnnotationProxy

public final class AnnotationProxy extends Object
Proxies annotations in a classloader-safe way in the event we are dealing with two classloaders holding the same classes.

This allows retrieving annotations on an AnnotatedElement safely even when the wrong classloader is used by Plexus.

Ideally, this should never be needed, but for reasons we cannot consistently reproduce, certain components get shared between Mojo executions, even when scoping per Mojo instance.

See GH-974 for such an example.

Since:
5.1.3
Author:
Ashley Scopes