graphql.kickstart.tools.GuiceAopProxyHandler 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 GuiceAopProxyHandler implements ProxyHandler {
@Override
public boolean canHandle(GraphQLResolver> resolver) {
return isGuiceProxy(resolver);
}
@Override
public Class> getTargetClass(GraphQLResolver> resolver) {
return resolver.getClass().getSuperclass();
}
private boolean isGuiceProxy(GraphQLResolver> resolver) {
return resolver.getClass().getName().contains("$$EnhancerByGuice$$");
}
}