Clover icon

sunshower-core

  1. Project Clover database Fri Apr 6 2018 03:27:42 UTC
  2. Package io.sunshower.service.graph

File SpringGraphServiceResolver.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
2
2
1
20
14
2
1
1
2
1

Classes

Class Line # Actions
SpringGraphServiceResolver 8 2 2
1.0100%
 

Contributing tests

This file is covered by 1 test. .

Source view

1    package io.sunshower.service.graph;
2   
3    import io.sunshower.service.graph.service.GraphService;
4    import io.sunshower.service.graph.service.GraphServiceResolver;
5    import org.springframework.context.ApplicationContext;
6   
7    /** Created by haswell on 5/25/17. */
 
8    public class SpringGraphServiceResolver implements GraphServiceResolver {
9   
10    private final ApplicationContext context;
11   
 
12  2 toggle public SpringGraphServiceResolver(final ApplicationContext context) {
13  2 this.context = context;
14    }
15   
 
16  1 toggle @Override
17    public <T extends GraphService> T resolve(Class<T> type, String name) {
18  1 return this.context.getBean(name, type);
19    }
20    }