Slide 53
Slide 53 text
public void linkRequested() {
…
while ((binding = toLink.poll()) != null) {
if (binding instanceof DeferredBinding) {
… = createBinding(…, deferred.classLoader, …);
}
}
}
private Binding> createBinding(…, ClassLoader classLoader, …) {
…
… = instantiate(className.concat(INJECT_ADAPTER_SUFFIX), classLoader);
…
}
protected T instantiate(String name, ClassLoader classLoader) {
Class> generatedClass = loadClass(classLoader, name);
if (generatedClass == Void.class) return null;
return (T) generatedClass.newInstance();
}