1 *java.lang.annotation.Annotation* *Annotation* The common interface extended by
3 public interface interface Annotation
6 |java.lang.annotation.Annotation_Description|
7 |java.lang.annotation.Annotation_Fields|
8 |java.lang.annotation.Annotation_Constructors|
9 |java.lang.annotation.Annotation_Methods|
11 ================================================================================
13 *java.lang.annotation.Annotation_Methods*
14 |java.lang.annotation.Annotation.annotationType()|Returns the annotation type o
15 |java.lang.annotation.Annotation.equals(Object)|Returns true if the specified o
16 |java.lang.annotation.Annotation.hashCode()|Returns the hash code of this annot
17 |java.lang.annotation.Annotation.toString()|Returns a string representation of
19 *java.lang.annotation.Annotation_Description*
21 The common interface extended by all annotation types. Note that an interface
22 that manually extends this one does not define an annotation type. Also note
23 that this interface does not itself define an annotation type.
26 *java.lang.annotation.Annotation.annotationType()*
28 public |java.lang.Class| annotationType()
30 Returns the annotation type of this annotation.
33 *java.lang.annotation.Annotation.equals(Object)*
35 public boolean equals(java.lang.Object obj)
37 Returns true if the specified object represents an annotation that is logically
38 equivalent to this one. In other words, returns true if the specified object is
39 an instance of the same annotation type as this instance, all of whose members
40 are equal to the corresponding member of this annotation, as defined below:
42 Two corresponding primitive typed members whose values are x and y are
43 considered equal if x == y, unless their type is float or double.
45 Two corresponding float members whose values are x and y are considered equal
46 if Float.valueOf(x).equals(Float.valueOf(y)). (Unlike the == operator, NaN is
47 considered equal to itself, and 0.0f unequal to -0.0f.)
49 Two corresponding double members whose values are x and y are considered equal
50 if Double.valueOf(x).equals(Double.valueOf(y)). (Unlike the == operator, NaN is
51 considered equal to itself, and 0.0 unequal to -0.0.)
53 Two corresponding String, Class, enum, or annotation typed members whose values
54 are x and y are considered equal if x.equals(y). (Note that this definition is
55 recursive for annotation typed members.)
57 Two corresponding array typed members x and y are considered equal if
58 Arrays.equals(x, y), for the appropriate overloading of (|java.util.Arrays|) .
61 Returns: true if the specified object represents an annotation that is logically
62 equivalent to this one, otherwise false
63 *java.lang.annotation.Annotation.hashCode()*
67 Returns the hash code of this annotation, as defined below:
69 The hash code of an annotation is the sum of the hash codes of its members
70 (including those with default values), as defined below:
72 The hash code of an annotation member is (127 times the hash code of the
73 member-name as computed by (|java.lang.String|) ) XOR the hash code of the
74 member-value, as defined below:
76 The hash code of a member-value depends on its type:
78 The hash code of a primitive value v is equal to
79 WrapperType.valueOf(v).hashCode(), where WrapperType is the wrapper type
80 corresponding to the primitive type of v ( (|java.lang.Byte|) ,
81 (|java.lang.Character|) , (|java.lang.Double|) , (|java.lang.Float|) ,
82 (|java.lang.Integer|) , (|java.lang.Long|) , (|java.lang.Short|) , or
83 (|java.lang.Boolean|) ).
85 The hash code of a string, enum, class, or annotation member-value I v is
86 computed as by calling v.hashCode(). (In the case of annotation member values,
87 this is a recursive definition.)
89 The hash code of an array member-value is computed by calling the appropriate
90 overloading of Arrays.hashCode(|java.util.Arrays|) on the value. (There is one
91 overloading for each primitive type, and one for object reference types.)
94 Returns: the hash code of this annotation
95 *java.lang.annotation.Annotation.toString()*
97 public |java.lang.String| toString()
99 Returns a string representation of this annotation. The details of the
100 representation are implementation-dependent, but the following may be regarded
103 com.acme.util.Name(first=Alfred, middle=E., last=Neuman)
106 Returns: a string representation of this annotation