/** * Determine the order for this factory's aspect instance, * either an instance-specific order expressed through implementing * the {@link org.springframework.core.Ordered} interface, * or a fallback order. * @see org.springframework.core.Ordered * @see #getOrderForAspectClass */ @Override public int getOrder() { if (this.aspectInstance instanceof Ordered) { return ((Ordered) this.aspectInstance).getOrder(); } return getOrderForAspectClass(this.aspectInstance.getClass()); }
@Override protected AspectJAroundAdvice createInstance() throws Exception { final Class<? extends Object> aspectType = this.aspect.getClass(); final Method method = ReflectionUtils.findMethod(aspectType, this.method, this.args); final SingletonAspectInstanceFactory aif = new SingletonAspectInstanceFactory(this.aspect); return new AspectJAroundAdvice(method, pointcut, aif); } }
/** * Determine the order for this factory's aspect instance, * either an instance-specific order expressed through implementing * the {@link org.springframework.core.Ordered} interface, * or a fallback order. * @see org.springframework.core.Ordered * @see #getOrderForAspectClass */ @Override public int getOrder() { if (this.aspectInstance instanceof Ordered) { return ((Ordered) this.aspectInstance).getOrder(); } return getOrderForAspectClass(this.aspectInstance.getClass()); }
/** * Determine the order for this factory's aspect instance, * either an instance-specific order expressed through implementing * the {@link org.springframework.core.Ordered} interface, * or a fallback order. * @see org.springframework.core.Ordered * @see #getOrderForAspectClass */ @Override public int getOrder() { if (this.aspectInstance instanceof Ordered) { return ((Ordered) this.aspectInstance).getOrder(); } return getOrderForAspectClass(this.aspectInstance.getClass()); }