--- old/src/java.compiler/share/classes/javax/lang/model/element/Element.java 2020-02-18 20:16:12.081228000 -0800 +++ new/src/java.compiler/share/classes/javax/lang/model/element/Element.java 2020-02-18 20:16:11.849343999 -0800 @@ -35,7 +35,6 @@ import javax.lang.model.type.*; import javax.lang.model.util.*; - /** * Represents a program element such as a module, package, class, or method. * Each element represents a static, language-level construct @@ -268,14 +267,16 @@ @Override int hashCode(); - /** * {@inheritDoc} * - *

To get inherited annotations as well, use {@link + *

To get inherited annotations as well, use {@link * Elements#getAllAnnotationMirrors(Element) * getAllAnnotationMirrors}. * + *

Note that any annotations returned by this method are + * declaration annotations. + * * @since 1.6 */ @Override @@ -283,12 +284,27 @@ /** * {@inheritDoc} + * + *

Note that any annotation returned by this method is a + * declaration annotation. + * * @since 1.6 */ @Override A getAnnotation(Class annotationType); /** + * {@inheritDoc} + * + *

Note that any annotations returned by this method are + * declaration annotations. + * + * @since 8 + */ + @Override + A[] getAnnotationsByType(Class annotationType); + + /** * Applies a visitor to this element. * * @param the return type of the visitor's methods