if (instanceDefs.size() > 0)
{
aspects = new WeakHashMap();
for (Iterator it = instanceDefs.iterator() ; it.hasNext() ; )
{
AspectDefinition def = (AspectDefinition) it.next();
ia.addPerInstanceAspect(def);
Object aspect = def.getFactory().createPerInstance(getClassAdvisor(), instanceAdvisor);
aspects.put(def, aspect);
}
}
}
Set defs = getClassAdvisor().getPerInstanceAspectDefinitions();
if (defs.size() > 0)
{
if (aspects == null)
{
aspects = new WeakHashMap();
}
Iterator it = defs.iterator();
while (it.hasNext())
{
AspectDefinition def = (AspectDefinition) it.next();
Object aspect = def.getFactory().createPerInstance(getClassAdvisor(), instanceAdvisor);
aspects.put(def, aspect);
}
}
}