graphql.kickstart.tools.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;
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");
}
}