AnnotationInstance and implements equality and hash code as equivalence.
When using equivalence proxies, it is usually a mistake to obtain the target of the delegate annotation instance.
Thread-Safety
This class is immutable and can be shared between threads without safe publication.AnnotationInstance#equivalentTo(AnnotationInstance), AnnotationInstance#equivalenceHashCode()
| Modifier and Type | Field and Description |
|---|---|
| private final AnnotationInstance |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public AnnotationInstance | |
| public int |
| annotation | back to summary |
|---|---|
| private final AnnotationInstance annotation | |
| AnnotationInstanceEquivalenceProxy | back to summary |
|---|---|
| pack-priv AnnotationInstanceEquivalenceProxy(AnnotationInstance annotation) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| get | back to summary |
|---|---|
| public AnnotationInstance get() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |