@Override public Advisor getAdvisor(Method candidateAdviceMethod, MetadataAwareAspectInstanceFactory aif, int declarationOrderInAspect, String aspectName) { Advisor advisor = super.getAdvisor(candidateAdviceMethod, aif, declarationOrderInAspect, aspectName); // test declare mixin annotation if (advisor == null) { DeclareMixin declareMixin = AnnotationUtils.findAnnotation(candidateAdviceMethod, DeclareMixin.class); if (declareMixin != null) { advisor = new DeclareMixinAdvisor(candidateAdviceMethod, aif.getAspectInstance(), declareMixin.value()); } } return advisor; }
@DeclareMixin("com.uphyca.gradle.android.aspectj..*") public static Moody createMoodyImplementation() { return new MoodyImpl(); }
@DeclareMixin("ajia.banking.domain.*") public Identifiable identifiableMixin() { return new IdentifiableDefaultImpl(); }
@DeclareMixin("ajia.banking.domain.*") public Identifiable identifiableMixin() { return null; }
@DeclareMixin("aop.NotTargetAware") public TargetAware createTargetAware(Object target) { return new DefaultTargetAware(target); }