15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.lang.annotation;
27
28 /**
29 * The common interface extended by all annotation types. Note that an
30 * interface that manually extends this one does <i>not</i> define
31 * an annotation type. Also note that this interface does not itself
32 * define an annotation type.
33 *
34 * More information about annotation types can be found in section {@jls 9.6} of
35 * <cite>The Java™ Language Specification</cite>.
36 *
37 * The {@link java.lang.reflect.AnnotatedElement} interface discusses
38 * compatibility concerns when evolving an annotation type from being
39 * non-repeatable to being repeatable.
40 *
41 * @author Josh Bloch
42 * @since 1.5
43 */
44 public interface Annotation {
45 /**
46 * Returns true if the specified object represents an annotation
47 * that is logically equivalent to this one. In other words,
48 * returns true if the specified object is an instance of the same
49 * annotation type as this instance, all of whose members are equal
50 * to the corresponding member of this annotation, as defined below:
51 * <ul>
52 * <li>Two corresponding primitive typed members whose values are
53 * {@code x} and {@code y} are considered equal if {@code x == y},
54 * unless their type is {@code float} or {@code double}.
55 *
|
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.lang.annotation;
27
28 /**
29 * The common interface extended by all annotation types. Note that an
30 * interface that manually extends this one does <i>not</i> define
31 * an annotation type. Also note that this interface does not itself
32 * define an annotation type.
33 *
34 * More information about annotation types can be found in section {@jls 9.6} of
35 * <cite>The Java Language Specification</cite>.
36 *
37 * The {@link java.lang.reflect.AnnotatedElement} interface discusses
38 * compatibility concerns when evolving an annotation type from being
39 * non-repeatable to being repeatable.
40 *
41 * @author Josh Bloch
42 * @since 1.5
43 */
44 public interface Annotation {
45 /**
46 * Returns true if the specified object represents an annotation
47 * that is logically equivalent to this one. In other words,
48 * returns true if the specified object is an instance of the same
49 * annotation type as this instance, all of whose members are equal
50 * to the corresponding member of this annotation, as defined below:
51 * <ul>
52 * <li>Two corresponding primitive typed members whose values are
53 * {@code x} and {@code y} are considered equal if {@code x == y},
54 * unless their type is {@code float} or {@code double}.
55 *
|