R
Raymond McCrae
Hi
I can't find any way to get access to an annotation on the return type
of a method. For example the code below complies however there is no
method on the "Method" class (that I can see) that gives me access to
the annoation.
Could someone point me to something I may have misses.
example:
import java.lang.annotation.*;
@Retention(value=RetentionPolicy.RUNTIME)
@Target(value=ElementType.ANNOTATION_TYPE)
public @interface MyAnnotation {
String value();
}
public class TestClass {
public static @MyAnnotation("hello")void myMethod() {
}
}
Thank
Raymond McCrae
I can't find any way to get access to an annotation on the return type
of a method. For example the code below complies however there is no
method on the "Method" class (that I can see) that gives me access to
the annoation.
Could someone point me to something I may have misses.
example:
import java.lang.annotation.*;
@Retention(value=RetentionPolicy.RUNTIME)
@Target(value=ElementType.ANNOTATION_TYPE)
public @interface MyAnnotation {
String value();
}
public class TestClass {
public static @MyAnnotation("hello")void myMethod() {
}
}
Thank
Raymond McCrae