Java 类org.aspectj.lang.annotation.DeclareMixin 实例源码

项目:jdal    文件:DeclareMixinAspectJAdvisorFactory.java   
@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;
}
项目:gradle-android-aspectj-plugin    文件:MoodIndicator.java   
@DeclareMixin("com.uphyca.gradle.android.aspectj..*")
public static Moody createMoodyImplementation() {
    return new MoodyImpl();
}
项目:aspectj-in-action-code    文件:AccountTracking.java   
@DeclareMixin("ajia.banking.domain.*")
public Identifiable identifiableMixin() {
    return new IdentifiableDefaultImpl();
}
项目:aspectj-in-action-code    文件:AccountTracking.java   
@DeclareMixin("ajia.banking.domain.*")
public Identifiable identifiableMixin() {
    return null;
}
项目:aspectj-in-action-code    文件:AccountTracking.java   
@DeclareMixin("ajia.banking.domain.*")
public Identifiable identifiableMixin() {
    return new IdentifiableDefaultImpl();
}
项目:jdal    文件:DeclareMixinAspectJAdvisorFactoryTest.java   
@DeclareMixin("aop.NotTargetAware")
public TargetAware createTargetAware(Object target) {
    return new DefaultTargetAware(target);
}