MCPcopy Create free account
hub / github.com/JakeWharton/u2020 / Injector

Class Injector

app/src/main/java/com/jakewharton/u2020/data/Injector.java:6–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import dagger.ObjectGraph;
5
6public final class Injector {
7 private static final String INJECTOR_SERVICE = "com.jakewharton.u2020.injector";
8
9 @SuppressWarnings({"ResourceType", "WrongConstant"}) // Explicitly doing a custom service.
10 public static ObjectGraph obtain(Context context) {
11 return (ObjectGraph) context.getSystemService(INJECTOR_SERVICE);
12 }
13
14 public static boolean matchesService(String name) {
15 return INJECTOR_SERVICE.equals(name);
16 }
17
18 private Injector() {
19 throw new AssertionError("No instances.");
20 }
21}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected