Wie man eine Methode Kommentar Wert aus einer ProceedingJoinPoint?

Habe ich folgende annotation.

MyAnnotation.java

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface MyAnnotation {

}

SomeAspect.java

public class SomeAspect{

 @Around("execution(public * *(..)) && @annotation(com.mycompany.MyAnnotation)")
    public Object procede(ProceedingJoinPoint call) throws Throwable {

  //Some logic

}

}

SomeOther.java

public class SomeOther{

@MyAnnotation("ABC") 
public String someMethod(String name){


}


}

In der obigen Klasse bin passing "ABC" mit in @MyAnnotation.
Nun, wie kann ich den Zugriff "ABC" - Wert in procede Methode der SomeAspect.java Klasse?

Dank!

InformationsquelleAutor user755806 | 2014-01-22
Schreibe einen Kommentar