graphql.kickstart.tools.proxy.WeldProxyHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-java-tools Show documentation
Show all versions of graphql-java-tools Show documentation
Tools to help map a GraphQL schema to existing Java objects.
package graphql.kickstart.tools.proxy;
import graphql.kickstart.tools.GraphQLResolver;
public class WeldProxyHandler implements ProxyHandler {
@Override
public boolean canHandle(GraphQLResolver> resolver) {
return isWeldProxy(resolver);
}
@Override
public Class> getTargetClass(GraphQLResolver> resolver) {
return resolver.getClass().getSuperclass();
}
private boolean isWeldProxy(GraphQLResolver> resolver) {
return resolver.getClass().getName().contains("$Proxy$_$$_WeldClientProxy");
}
}