diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientProxies.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientProxies.java index 02208bffab490..f7bb2dc7bf51b 100644 --- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientProxies.java +++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientProxies.java @@ -1,5 +1,7 @@ package org.jboss.resteasy.reactive.client.impl; +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; import java.util.Collection; import java.util.List; import java.util.Map; @@ -29,15 +31,45 @@ public T get(Class clazz, WebTarget webTarget, List clazz) { + for (Annotation annotation : clazz.getAnnotations()) { + if (isRestClientAnnotation(annotation)) { + return true; + } + } + for (Method method : clazz.getDeclaredMethods()) { + for (Annotation annotation : method.getDeclaredAnnotations()) { + if (isRestClientAnnotation(annotation)) { + return true; + } + } + } + return false; + } + + private boolean isRestClientAnnotation(Annotation annotation) { + String annClassName = annotation.annotationType().getName(); + if (annClassName.startsWith("jakarta.ws.rs") || annClassName.startsWith( + "org.eclipse.microprofile.rest.client")) { + return true; + } + return false; + } + // for dev console public ClientData getClientData() { return new ClientData(clientProxies.keySet(), failures);