if (target == null)
{
throw new RuntimeException("Attempt to get instance advisor without having an instance");
}
InstanceAdvisorDelegate instanceAdvisorDelegate = instanceAdvisorDelegates.get(target);
if(instanceAdvisorDelegate != null)
return instanceAdvisorDelegate;
synchronized (this)
{
if(instanceAdvisorDelegate == null)
{
instanceAdvisorDelegate = new InstanceAdvisorDelegate(advisor, instanceAdvisor);
instanceAdvisorDelegate.initialize();
instanceAdvisorDelegates.put(target, instanceAdvisorDelegate);
}
}
return instanceAdvisorDelegate;
}