public interface Annotation
AnnotatedElement
接口兼容性问题时不断变化的注释类型的非重复不重复。
Modifier and Type | Method and Description |
---|---|
类<? extends Annotation> |
annotationType()
返回此注释的注释类型。
|
boolean |
equals(Object obj)
如果指定的对象表示一个逻辑上相当于这个注释的注释,则返回真。
|
int |
hashCode()
返回此注释的哈希代码,如下面所定义的:
|
String |
toString()
返回此注释的字符串表示形式。
|
boolean equals(Object obj)
Arrays.equals(long[], long[])
超载。equals
方法重写,继承类
Object
obj
-参考对象的比较。
Object.hashCode()
,
HashMap
int hashCode()
注解的哈希码是其成员的散列码的总和(包括那些默认值),定义如下:一个标注构件的哈希代码(127倍的哈希代码的成员名称的计算String.hashCode()
)异或的成员值的哈希代码,定义如下:
成员值的哈希代码取决于它的类型:
hashCode
方法重写,继承类
Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
String toString()
@ COM。极致。util。名字(第一为艾尔弗雷德,中间为大肠,最后=纽曼)
类<? extends Annotation> annotationType()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.