|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
These changes to java.lang.Override were not integrated:
@@ -9,16 +9,30 @@
import java.lang.annotation.*;
/**
* Indicates that a method declaration is intended to override a
- * method declaration in a superclass. If a method is annotated with
- * this annotation type but does not override a superclass method,
- * compilers are required to generate an error message.
+ * method declaration in a supertype. If a method is annotated with
+ * this annotation type compilers are required to generate an error
+ * message unless either of the following conditions hold:
+ *
+ * <ul>
+ * <li>
+ * The method does override or implement a method declared in a
+ * supertype.
+ * </li>
+ * <li>
+ * The method has a signature that is override-equivalent to that
+ * of any public or protected method declared in {@linkplain
+ * Object}.
+ * </li>
+ * </ul>
*
* @author Joshua Bloch
+ * @author Peter von der Ahé
* @since 1.5
+ * @jls3 9.6.1.4 Override
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE)
public @interface Override {
}
|