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.
27 *java.lang.annotation.Annotation.annotationType()*
29 public |java.lang.Class|<? extends java.lang.annotation.Annotation> annotationType()
31 Returns the annotation type of this annotation.
35 *java.lang.annotation.Annotation.equals(Object)*
37 public boolean equals(java.lang.Object obj)
39 Returns true if the specified object represents an annotation that is logically
40 equivalent to this one. In other words, returns true if the specified object is
41 an instance of the same annotation type as this instance, all of whose members
42 are equal to the corresponding member of this annotation, as defined below:
44 Two corresponding primitive typed members whose values are x and y are
45 considered equal if x == y, unless their type is float or double.
47 Two corresponding float members whose values are x and y are considered equal
48 if Float.valueOf(x).equals(Float.valueOf(y)). (Unlike the == operator, NaN is
49 considered equal to itself, and 0.0f unequal to -0.0f.)
51 Two corresponding double members whose values are x and y are considered equal
52 if Double.valueOf(x).equals(Double.valueOf(y)). (Unlike the == operator, NaN is
53 considered equal to itself, and 0.0 unequal to -0.0.)
55 Two corresponding String, Class, enum, or annotation typed members whose values
56 are x and y are considered equal if x.equals(y). (Note that this definition is
57 recursive for annotation typed members.)
59 Two corresponding array typed members x and y are considered equal if
60 Arrays.equals(x, y), for the appropriate overloading of (|java.util.Arrays|) .
64 Returns: true if the specified object represents an annotation that is logically
65 equivalent to this one, otherwise false
67 *java.lang.annotation.Annotation.hashCode()*
71 Returns the hash code of this annotation, as defined below:
73 The hash code of an annotation is the sum of the hash codes of its members
74 (including those with default values), as defined below:
76 The hash code of an annotation member is (127 times the hash code of the
77 member-name as computed by (|java.lang.String|) ) XOR the hash code of the
78 member-value, as defined below:
80 The hash code of a member-value depends on its type:
82 The hash code of a primitive value v is equal to
83 WrapperType.valueOf(v).hashCode(), where WrapperType is the wrapper type
84 corresponding to the primitive type of v ( (|java.lang.Byte|) ,
85 (|java.lang.Character|) , (|java.lang.Double|) , (|java.lang.Float|) ,
86 (|java.lang.Integer|) , (|java.lang.Long|) , (|java.lang.Short|) , or
87 (|java.lang.Boolean|) ).
89 The hash code of a string, enum, class, or annotation member-value I v is
90 computed as by calling v.hashCode(). (In the case of annotation member values,
91 this is a recursive definition.)
93 The hash code of an array member-value is computed by calling the appropriate
94 overloading of Arrays.hashCode(|java.util.Arrays|) on the value. (There is one
95 overloading for each primitive type, and one for object reference types.)
99 Returns: the hash code of this annotation
101 *java.lang.annotation.Annotation.toString()*
103 public |java.lang.String| toString()
105 Returns a string representation of this annotation. The details of the
106 representation are implementation-dependent, but the following may be regarded
109 com.acme.util.Name(first=Alfred, middle=E., last=Neuman)
113 Returns: a string representation of this annotation