public function initialize(ApplicationInterface $application)
{
/** @var \AppserverIo\Appserver\Core\DgClassLoader $dgClassLoader */
$dgClassLoader = $application->search('DgClassLoader');
// if we did not get the correct class loader our efforts are for naught
if (!$dgClassLoader instanceof DgClassLoader) {
$application->getInitialContext()->getSystemLogger()->warning(sprintf('Application %s uses the aspect manager but does not have access to the required Doppelgaenger class loader, AOP functionality will be omitted.', $application->getName()));
return;
}
// register the aspects and tell the class loader it can fill the cache
$this->registerAspects($application);
// inject the filled aspect register and create the cache based on it
$dgClassLoader->injectAspectRegister($this->getAspectRegister());
$dgClassLoader->createCache();
}