Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

readme.md

Java Annotations

Có 2 kiểu Java Annotation:

  1. Các Annotation được tích hợp sẵn trong Java: Override, Overload...

  2. Annotation tùy chỉnh - do người dùng định nghĩa.

Các Annotation được tính hợp trong Java

@Override, @SuppressWarnings, @Deprecated

@Target, @Retention, @Inherited, @Documented

Giải thích ý nghĩa của các Annotation phía sau:

Tùy chỉnh Annotation trong Java:

Mục đích:

Được người dùng định nghĩa rất dễ dàng để tạo và sử dụng ?? -> Chưa rõ phần này. Phần tử @interface được sử dung để khai báo một Annotation.

Các kiểu của Annotation:

  1. Marker Annotation

  2. Single-Value Annotation

  3. Multi-Value Annotation

Sử dụng Annotation tích hợp trong Annotation tùy chỉnh trong Java

@Target

@Retention

@Inherited

@Documented

Reference Document

Annotation trong Java

Tùy chỉnh Annotation trong Java