Search in sources :

Example 1 with Pointcut

use of org.aspectj.lang.annotation.Pointcut in project frodo by android10.

the class LogObservable method methodAnnotatedWithRxLogObservable.

@Pointcut(METHOD)
public static boolean methodAnnotatedWithRxLogObservable(ProceedingJoinPoint joinPoint) {
    final FrodoProceedingJoinPoint frodoJoinPoint = new FrodoProceedingJoinPoint(joinPoint);
    final Annotation annotation = frodoJoinPoint.getAnnotation(RxLogObservable.class);
    return ((MethodSignature) joinPoint.getSignature()).getReturnType() == Observable.class && ((RxLogObservable) annotation).value() != RxLogObservable.Scope.NOTHING;
}
Also used : FrodoProceedingJoinPoint(com.fernandocejas.frodo.joinpoint.FrodoProceedingJoinPoint) MethodSignature(org.aspectj.lang.reflect.MethodSignature) RxLogObservable(com.fernandocejas.frodo.annotation.RxLogObservable) Annotation(java.lang.annotation.Annotation) FrodoObservable(com.fernandocejas.frodo.internal.observable.FrodoObservable) Observable(rx.Observable) RxLogObservable(com.fernandocejas.frodo.annotation.RxLogObservable) Pointcut(org.aspectj.lang.annotation.Pointcut)

Aggregations

RxLogObservable (com.fernandocejas.frodo.annotation.RxLogObservable)1 FrodoObservable (com.fernandocejas.frodo.internal.observable.FrodoObservable)1 FrodoProceedingJoinPoint (com.fernandocejas.frodo.joinpoint.FrodoProceedingJoinPoint)1 Annotation (java.lang.annotation.Annotation)1 Pointcut (org.aspectj.lang.annotation.Pointcut)1 MethodSignature (org.aspectj.lang.reflect.MethodSignature)1 Observable (rx.Observable)1