// Path: schemagen-graphql-spring/src/main/java/com/bretpatterson/schemagen/graphql/datafetchers/spring/SpringDataFetcherFactory.java
// public class SpringDataFetcherFactory extends DefaultDataFetcherFactory {
// 
// 	ApplicationContext context;
// 	SpringBeanELResolver springBeanELResolver;
// 
// 	public SpringDataFetcherFactory(ApplicationContext context) {
// 		this.context = context;
// 	}
// 
// 	@Override
// 	public DataFetcher newFieldDataFetcher(final IGraphQLObjectMapper graphQLObjectMapper, final Optional<Object> targetObject, final Field field, final String fieldName, Class<? extends DataFetcher> dataFetcher) {
// 
// 		SpringDataFetcher dataFetcherObject = null;
// 		try {
// 			GraphQLSpringELDataFetcher springDataFetcher = field.getAnnotation(GraphQLSpringELDataFetcher.class);
// 			if (springDataFetcher != null) {
// 				dataFetcherObject = springDataFetcher.dataFetcher().newInstance();
// 				dataFetcherObject.setFieldName(field.getName());
// 				dataFetcherObject.setTypeFactory(graphQLObjectMapper.getTypeFactory());
// 				dataFetcherObject.setTargetObject(null);
// 				dataFetcherObject.setMethod(null);
// 				dataFetcherObject.setExpression(springDataFetcher.value());
// 				dataFetcherObject.setApplicationContext(context);
// 				return dataFetcherObject;
// 			}
// 		} catch (Exception ex) {
// 			throw Throwables.propagate(ex);
// 		}
// 
// 		return super.newFieldDataFetcher(graphQLObjectMapper, targetObject, field, fieldName, dataFetcher);
// 	}
// 
// 	@Override
// 	public DataFetcher newMethodDataFetcher(final IGraphQLObjectMapper graphQLObjectMapper,
// 			final Optional<Object> targetObject,
// 			final Method method,
// 			final String fieldName,
// 			final Class<? extends DataFetcher> dataFetcher) {
// 		checkNotNull(method);
// 		SpringDataFetcher dataFetcherObject = null;
// 		try {
// 			GraphQLSpringELDataFetcher springDataFetcher = method.getAnnotation(GraphQLSpringELDataFetcher.class);
// 			if (springDataFetcher != null) {
// 				dataFetcherObject = springDataFetcher.dataFetcher().newInstance();
// 				dataFetcherObject.setFieldName(fieldName);
// 				dataFetcherObject.setTypeFactory(graphQLObjectMapper.getTypeFactory());
// 				dataFetcherObject.setTargetObject(targetObject);
// 				dataFetcherObject.setMethod(method);
// 				dataFetcherObject.setExpression(springDataFetcher.value());
// 				dataFetcherObject.setApplicationContext(context);
// 				return dataFetcherObject;
// 			}
// 		} catch (Exception ex) {
// 			throw Throwables.propagate(ex);
// 		}
// 		return super.newMethodDataFetcher(graphQLObjectMapper, targetObject, method, fieldName, dataFetcher);
// 	}
// 
// }


import com.bretpatterson.schemagen.graphql.annotations.GraphQLTypeMapper;
import com.bretpatterson.schemagen.graphql.datafetchers.spring.SpringDataFetcherFactory;
import com.bretpatterson.schemagen.graphql.typemappers.IGraphQLTypeMapper;
import com.google.common.collect.ImmutableList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.util.ClassUtils;
import java.util.List;
package com.bretpatterson.schemagen.graphql;



public class GraphQLSpringSchemaBuilder extends GraphQLSchemaBuilder {

    private static final Logger LOGGER = LoggerFactory.getLogger(GraphQLSpringSchemaBuilder.class);

    private final ApplicationContext applicationContext;

    public GraphQLSpringSchemaBuilder(ApplicationContext applicationContext) {
        super();

        this.applicationContext = applicationContext;
// Path: schemagen-graphql-spring/src/main/java/com/bretpatterson/schemagen/graphql/datafetchers/spring/SpringDataFetcherFactory.java
// public class SpringDataFetcherFactory extends DefaultDataFetcherFactory {
// 
// 	ApplicationContext context;
// 	SpringBeanELResolver springBeanELResolver;
// 
// 	public SpringDataFetcherFactory(ApplicationContext context) {
// 		this.context = context;
// 	}
// 
// 	@Override
// 	public DataFetcher newFieldDataFetcher(final IGraphQLObjectMapper graphQLObjectMapper, final Optional<Object> targetObject, final Field field, final String fieldName, Class<? extends DataFetcher> dataFetcher) {
// 
// 		SpringDataFetcher dataFetcherObject = null;
// 		try {
// 			GraphQLSpringELDataFetcher springDataFetcher = field.getAnnotation(GraphQLSpringELDataFetcher.class);
// 			if (springDataFetcher != null) {
// 				dataFetcherObject = springDataFetcher.dataFetcher().newInstance();
// 				dataFetcherObject.setFieldName(field.getName());
// 				dataFetcherObject.setTypeFactory(graphQLObjectMapper.getTypeFactory());
// 				dataFetcherObject.setTargetObject(null);
// 				dataFetcherObject.setMethod(null);
// 				dataFetcherObject.setExpression(springDataFetcher.value());
// 				dataFetcherObject.setApplicationContext(context);
// 				return dataFetcherObject;
// 			}
// 		} catch (Exception ex) {
// 			throw Throwables.propagate(ex);
// 		}
// 
// 		return super.newFieldDataFetcher(graphQLObjectMapper, targetObject, field, fieldName, dataFetcher);
// 	}
// 
// 	@Override
// 	public DataFetcher newMethodDataFetcher(final IGraphQLObjectMapper graphQLObjectMapper,
// 			final Optional<Object> targetObject,
// 			final Method method,
// 			final String fieldName,
// 			final Class<? extends DataFetcher> dataFetcher) {
// 		checkNotNull(method);
// 		SpringDataFetcher dataFetcherObject = null;
// 		try {
// 			GraphQLSpringELDataFetcher springDataFetcher = method.getAnnotation(GraphQLSpringELDataFetcher.class);
// 			if (springDataFetcher != null) {
// 				dataFetcherObject = springDataFetcher.dataFetcher().newInstance();
// 				dataFetcherObject.setFieldName(fieldName);
// 				dataFetcherObject.setTypeFactory(graphQLObjectMapper.getTypeFactory());
// 				dataFetcherObject.setTargetObject(targetObject);
// 				dataFetcherObject.setMethod(method);
// 				dataFetcherObject.setExpression(springDataFetcher.value());
// 				dataFetcherObject.setApplicationContext(context);
// 				return dataFetcherObject;
// 			}
// 		} catch (Exception ex) {
// 			throw Throwables.propagate(ex);
// 		}
// 		return super.newMethodDataFetcher(graphQLObjectMapper, targetObject, method, fieldName, dataFetcher);
// 	}
// 
// }


// Path: schemagen-graphql-spring/src/main/java/com/bretpatterson/schemagen/graphql/GraphQLSpringSchemaBuilder.java
import com.bretpatterson.schemagen.graphql.annotations.GraphQLTypeMapper;
import com.bretpatterson.schemagen.graphql.datafetchers.spring.SpringDataFetcherFactory;
import com.bretpatterson.schemagen.graphql.typemappers.IGraphQLTypeMapper;
import com.google.common.collect.ImmutableList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.util.ClassUtils;
import java.util.List;

package com.bretpatterson.schemagen.graphql;



public class GraphQLSpringSchemaBuilder extends GraphQLSchemaBuilder {

    private static final Logger LOGGER = LoggerFactory.getLogger(GraphQLSpringSchemaBuilder.class);

    private final ApplicationContext applicationContext;

    public GraphQLSpringSchemaBuilder(ApplicationContext applicationContext) {
        super();

        this.applicationContext = applicationContext;
        this.registerDataFetcherFactory(new SpringDataFetcherFactory(applicationContext));