提交 0cd9b409 编写于 作者: J jfranck

8007808: Missing method: Executable.getAnnotatedReturnType()

Reviewed-by: darcy, forax
上级 8409dea5
......@@ -532,6 +532,7 @@ public final class Constructor<T> extends Executable {
* {@inheritDoc}
* @since 1.8
*/
@Override
public AnnotatedType getAnnotatedReturnType() {
return getAnnotatedReturnType0(getDeclaringClass());
}
......
......@@ -476,6 +476,20 @@ public abstract class Executable extends AccessibleObject
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.
*
......
......@@ -629,6 +629,7 @@ public final class Method extends Executable {
* {@inheritDoc}
* @since 1.8
*/
@Override
public AnnotatedType getAnnotatedReturnType() {
return getAnnotatedReturnType0(getGenericReturnType());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册