How do annotations like @Override work internally in Java?

前端 未结 6 889
粉色の甜心
粉色の甜心 2020-12-02 03:56

Can anybody explain to me how annotations work internally in java?

I know how we can create custom annotations by using java.lang.annotation library in java. But I s

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 04:30

    Follow this link. This will provide close answer for your problem. If we focused on annotations in Java, Annotations were introduced in Java 5 and are not Spring specific. In general, annotations allow you to add metadata to a class, method or variable. An annotation can be interpreted by the compiler (for example, the @Override annotation) or by a framework such as spring (for example, the @Component annotation).

    In addition I am adding more references.

    1. http://www.codeproject.com/Articles/272736/Understanding-Annotations-in-Java
    2. http://docs.oracle.com/javase/7/docs/api/java/lang/annotation/package-summary.html
    3. http://www.coderanch.com/how-to/java/AnnotationsExample

提交回复
热议问题