private void removeAdvice(final String pointcut,
final Class adviceClass) {
ExpressionInfo expressionInfo = new ExpressionInfo(pointcut, EXPRESSION_NAMESPACE);
Object[] emittedJoinPoints = m_emittedJoinPoints.getValues();
for (int i = 0; i < emittedJoinPoints.length; i++) {
EmittedJoinPoint emittedJoinPoint = (EmittedJoinPoint) emittedJoinPoints[i];
if (match(expressionInfo, PointcutType.EXECUTION, emittedJoinPoint)
|| match(expressionInfo, PointcutType.CALL, emittedJoinPoint)
|| match(expressionInfo, PointcutType.HANDLER, emittedJoinPoint)
|| match(expressionInfo, PointcutType.GET, emittedJoinPoint)
|| match(expressionInfo, PointcutType.SET, emittedJoinPoint)
//note: STATIC INIT is useless since the class is already loaded to manipulate the instance
) {
int hash = emittedJoinPoint.getJoinPointClassName().hashCode();
removeAroundAdvice(adviceClass, hash);
removeBeforeAdvice(adviceClass, hash);
removeAfterAdvice(adviceClass, hash);
removeAfterReturningAdvice(adviceClass, hash);
removeAfterThrowingAdvice(adviceClass, hash);