1
import org.aspectj.lang.annotation.Aspect;
2
import java.lang.annotation.*;
4
public aspect PerThisAspect perthis(execution(* Foo.foo(..))) {
6
public static void main(String[] args) {
7
Annotation[] annotations = PerThisAspect.class.getAnnotations();
8
if (annotations.length != 1) throw new RuntimeException("Should have one annotation");
9
Aspect aspectAnnotation = (Aspect) annotations[0];
10
if (!aspectAnnotation.value().equals("perthis(execution(* Foo.foo(..)))")) throw new RuntimeException("value should be equal to perclause");
b'\\ No newline at end of file'