package com.yammer.metrics.spring;

import org.aopalliance.intercept.MethodInterceptor;
import org.springframework.aop.Pointcut;
import org.springframework.aop.support.annotation.AnnotationMatchingPointcut;
import org.springframework.core.Ordered;

import com.yammer.metrics.annotation.Timed;
import com.yammer.metrics.core.MetricsRegistry;

public class TimedAnnotationBeanPostProcessor extends AbstractProxyingBeanPostProcessor implements
                                                                                        Ordered {

    private static final long serialVersionUID = -1589475386869891203L;

    private final Pointcut pointcut = new AnnotationMatchingPointcut(null, Timed.class);
    private final MetricsRegistry metrics;

    public TimedAnnotationBeanPostProcessor(final MetricsRegistry metrics) {
        this.metrics = metrics;
    }

    @Override
    public Pointcut getPointcut() {
        return pointcut;
    }

    @Override
    public MethodInterceptor getMethodInterceptor(Class<?> targetClass) {
        return new TimedMethodInterceptor(metrics, targetClass);
    }

    @Override
    public int getOrder() {
        return HIGHEST_PRECEDENCE;
    }

}

@@ -203,49 +203,8 @@
 cut;
-%0Aimport org.springframework.core.Ordered;
 %0A%0Aim
@@ -386,115 +386,8 @@
 sor 
-implements%0A                                                                                        Ordered 
 %7B%0A%0A 
@@ -953,90 +953,6 @@
  %7D%0A%0A
-    @Override%0A    public int getOrder() %7B%0A        return HIGHEST_PRECEDENCE;%0A    %7D%0A%0A
 %7D%0A

Remove Ordered interface from TimedAnnotationBeanPostProcessor