public final class GraphAnalysisLoader extends Loader
Binding.Resolver suitable for tool use at build time. The bindings created by
this Binding.Resolver have the correct dependency graph, but do not implement
Binding.get() or Binding.injectMembers(T) methods. They are only suitable
for graph analysis and error detection.| Constructor and Description |
|---|
GraphAnalysisLoader(ProcessingEnvironment processingEnv) |
| Modifier and Type | Method and Description |
|---|---|
Binding<?> |
getAtInjectBinding(String key,
String className,
ClassLoader classLoader,
boolean mustHaveInjections)
Returns a binding that uses
@Inject annotations, or null if no valid binding can
be found or created. |
<T> ModuleAdapter<T> |
getModuleAdapter(Class<T> moduleClass)
Returns a module adapter for
moduleClass or throws a TypeNotPresentException if
none can be found. |
StaticInjection |
getStaticInjection(Class<?> injectedClass)
Returns the static injection for
injectedClass. |
instantiate, loadClasspublic GraphAnalysisLoader(ProcessingEnvironment processingEnv)
public Binding<?> getAtInjectBinding(String key, String className, ClassLoader classLoader, boolean mustHaveInjections)
Loader@Inject annotations, or null if no valid binding can
be found or created.getAtInjectBinding in class Loaderpublic <T> ModuleAdapter<T> getModuleAdapter(Class<T> moduleClass)
LoadermoduleClass or throws a TypeNotPresentException if
none can be found.getModuleAdapter in class Loaderpublic StaticInjection getStaticInjection(Class<?> injectedClass)
LoaderinjectedClass.getStaticInjection in class LoaderCopyright © 2024 Square, Inc.. All rights reserved.