}
allIcptrs.add(icptr);
}
else
{
AbstractAdvice advice = (AbstractAdvice)icptrs[i];
Object aspectInstance = null;
if (icptrs[i] instanceof PerInstanceAdvice && !Modifier.isStatic(info.getMethod().getModifiers()))
{
requiresInstanceAdvisor = true;
InstanceAdvisor ia = getProxyInstanceAdvisor();
aspectInstance = ((PerInstanceAdvice)advice).getAspectInstance(ia);
}
else if (icptrs[i] instanceof PerJoinpointAdvice && !Modifier.isStatic(info.getMethod().getModifiers()))
{
requiresInstanceAdvisor = true;
InstanceAdvisor ia = getProxyInstanceAdvisor();
aspectInstance = ((PerJoinpointAdvice)advice).getAspectInstance(ia);
}
else
{
aspectInstance = advice.getAspectInstance();
}
if (aspectInstance != null)
{
MarshalledAdvice ma = new MarshalledAdvice(aspectInstance, icptrs[i].getName(), advice.getAdviceName());
allIcptrs.add(ma);
}
}
}
interceptors = allIcptrs.toArray(new Interceptor[allIcptrs.size()]);