# HG changeset patch # User jfranck # Date 1362591351 -3600 # Node ID 5b8d8cec62806c2e98d64fd21d03c8f7ae17ff8f # Parent 16a81953a291f7287a8ba625897184cea3661d04 8007808: Missing method: Executable.getAnnotatedReturnType() Reviewed-by: darcy, forax diff -r 16a81953a291 -r 5b8d8cec6280 jdk/src/share/classes/java/lang/reflect/Constructor.java --- a/jdk/src/share/classes/java/lang/reflect/Constructor.java Tue Mar 05 19:25:35 2013 +0100 +++ b/jdk/src/share/classes/java/lang/reflect/Constructor.java Wed Mar 06 18:35:51 2013 +0100 @@ -532,6 +532,7 @@ * {@inheritDoc} * @since 1.8 */ + @Override public AnnotatedType getAnnotatedReturnType() { return getAnnotatedReturnType0(getDeclaringClass()); } diff -r 16a81953a291 -r 5b8d8cec6280 jdk/src/share/classes/java/lang/reflect/Executable.java --- a/jdk/src/share/classes/java/lang/reflect/Executable.java Tue Mar 05 19:25:35 2013 +0100 +++ b/jdk/src/share/classes/java/lang/reflect/Executable.java Wed Mar 06 18:35:51 2013 +0100 @@ -476,6 +476,20 @@ return declaredAnnotations; } + /** + * Returns an AnnotatedType object that represents the potentially + * annotated return type of the method/constructor represented by this + * Executable. + * + * If this Executable represents a constructor, the AnnotatedType object + * represents the type of the constructed object. + * + * If this Executable represents a method, the AnnotatedType object + * represents the use of a type to specify the return type of the method. + * + * @since 1.8 + */ + public abstract AnnotatedType getAnnotatedReturnType(); /* Helper for subclasses of Executable. * diff -r 16a81953a291 -r 5b8d8cec6280 jdk/src/share/classes/java/lang/reflect/Method.java --- a/jdk/src/share/classes/java/lang/reflect/Method.java Tue Mar 05 19:25:35 2013 +0100 +++ b/jdk/src/share/classes/java/lang/reflect/Method.java Wed Mar 06 18:35:51 2013 +0100 @@ -629,6 +629,7 @@ * {@inheritDoc} * @since 1.8 */ + @Override public AnnotatedType getAnnotatedReturnType() { return getAnnotatedReturnType0(getGenericReturnType()); }