Which annotations are baked in to Java?
I was looking for a list of annotations in Java that have some meaningful use and are enabled by default (without having to import anything). For example, @Deprecated, @SuppressWarning, etc. I couldn't find one though. Is it out there somewhere, or could we compile one?
Annotations in java.lang (not requiring additional import) package available in standard JDK include:
A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists.
Indicates that a method declaration is intended to override a method declaration in a supertype.
Indicates that the named compiler warnings should be suppressed in the annotated element (and in all program elements contained in the annotated element).
@SafeVarargs (since Java 7)
A programmer assertion that the body of the annotated method or constructor does not perform potentially unsafe operations on its varargs parameter.
First Bing result: http://en.wikipedia.org/wiki/Java_annotation
Its mainly these 3 annotation,
@Deprecated @Override @SuppressWarnings
But from Java 7 below was also included.
See these links below: