Annotation (Java SE 15 & JDK 15) (original) (raw)

All Known Implementing Classes:

[BeanProperty](../../../../java.desktop/java/beans/BeanProperty.html "annotation in java.beans"), [BooleanFlag](../../../../jdk.jfr/jdk/jfr/BooleanFlag.html "annotation in jdk.jfr"), [Category](../../../../jdk.jfr/jdk/jfr/Category.html "annotation in jdk.jfr"), [ConstructorParameters](../../../../java.management/javax/management/ConstructorParameters.html "annotation in javax.management"), [ConstructorProperties](../../../../java.desktop/java/beans/ConstructorProperties.html "annotation in java.beans"), [ContentType](../../../../jdk.jfr/jdk/jfr/ContentType.html "annotation in jdk.jfr"), [DataAmount](../../../../jdk.jfr/jdk/jfr/DataAmount.html "annotation in jdk.jfr"), [Deprecated](../Deprecated.html "annotation in java.lang"), [Description](../../../../jdk.jfr/jdk/jfr/Description.html "annotation in jdk.jfr"), [DescriptorKey](../../../../java.management/javax/management/DescriptorKey.html "annotation in javax.management"), [Documented](Documented.html "annotation in java.lang.annotation"), [Enabled](../../../../jdk.jfr/jdk/jfr/Enabled.html "annotation in jdk.jfr"), [Experimental](../../../../jdk.jfr/jdk/jfr/Experimental.html "annotation in jdk.jfr"), [Frequency](../../../../jdk.jfr/jdk/jfr/Frequency.html "annotation in jdk.jfr"), [FunctionalInterface](../FunctionalInterface.html "annotation in java.lang"), [Generated](../../../../java.compiler/javax/annotation/processing/Generated.html "annotation in javax.annotation.processing"), [Inherited](Inherited.html "annotation in java.lang.annotation"), [JavaBean](../../../../java.desktop/java/beans/JavaBean.html "annotation in java.beans"), [Label](../../../../jdk.jfr/jdk/jfr/Label.html "annotation in jdk.jfr"), [MemoryAddress](../../../../jdk.jfr/jdk/jfr/MemoryAddress.html "annotation in jdk.jfr"), [MetadataDefinition](../../../../jdk.jfr/jdk/jfr/MetadataDefinition.html "annotation in jdk.jfr"), [MXBean](../../../../java.management/javax/management/MXBean.html "annotation in javax.management"), [Name](../../../../jdk.jfr/jdk/jfr/Name.html "annotation in jdk.jfr"), [Native](Native.html "annotation in java.lang.annotation"), [Override](../Override.html "annotation in java.lang"), [Percentage](../../../../jdk.jfr/jdk/jfr/Percentage.html "annotation in jdk.jfr"), [Period](../../../../jdk.jfr/jdk/jfr/Period.html "annotation in jdk.jfr"), [Registered](../../../../jdk.jfr/jdk/jfr/Registered.html "annotation in jdk.jfr"), [Relational](../../../../jdk.jfr/jdk/jfr/Relational.html "annotation in jdk.jfr"), [Repeatable](Repeatable.html "annotation in java.lang.annotation"), [Retention](Retention.html "annotation in java.lang.annotation"), [SafeVarargs](../SafeVarargs.html "annotation in java.lang"), [Serial](../../io/Serial.html "annotation in java.io"), [SettingDefinition](../../../../jdk.jfr/jdk/jfr/SettingDefinition.html "annotation in jdk.jfr"), [StackTrace](../../../../jdk.jfr/jdk/jfr/StackTrace.html "annotation in jdk.jfr"), [SupportedAnnotationTypes](../../../../java.compiler/javax/annotation/processing/SupportedAnnotationTypes.html "annotation in javax.annotation.processing"), [SupportedOptions](../../../../java.compiler/javax/annotation/processing/SupportedOptions.html "annotation in javax.annotation.processing"), [SupportedSourceVersion](../../../../java.compiler/javax/annotation/processing/SupportedSourceVersion.html "annotation in javax.annotation.processing"), [SuppressWarnings](../SuppressWarnings.html "annotation in java.lang"), [SwingContainer](../../../../java.desktop/javax/swing/SwingContainer.html "annotation in javax.swing"), [Target](Target.html "annotation in java.lang.annotation"), [Threshold](../../../../jdk.jfr/jdk/jfr/Threshold.html "annotation in jdk.jfr"), [Timespan](../../../../jdk.jfr/jdk/jfr/Timespan.html "annotation in jdk.jfr"), [Timestamp](../../../../jdk.jfr/jdk/jfr/Timestamp.html "annotation in jdk.jfr"), [Transient](../../../../java.desktop/java/beans/Transient.html "annotation in java.beans"), [TransitionFrom](../../../../jdk.jfr/jdk/jfr/TransitionFrom.html "annotation in jdk.jfr"), [TransitionTo](../../../../jdk.jfr/jdk/jfr/TransitionTo.html "annotation in jdk.jfr"), [Unsigned](../../../../jdk.jfr/jdk/jfr/Unsigned.html "annotation in jdk.jfr")


public interface Annotation

The common interface extended by all annotation types. Note that an interface that manually extends this one does not define an annotation type. Also note that this interface does not itself define an annotation type. More information about annotation types can be found in section 9.6 ofThe Java Language Specification. The AnnotatedElement interface discusses compatibility concerns when evolving an annotation type from being non-repeatable to being repeatable.

Since:

1.5

Modifier and Type Method Description
Class<? extends Annotation> annotationType() Returns the annotation type of this annotation.
boolean equals​(Object obj) Returns true if the specified object represents an annotation that is logically equivalent to this one.
int hashCode() Returns the hash code of this annotation, as defined below:
String toString() Returns a string representation of this annotation.