Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
14 lines (11 loc) · 556 Bytes

File metadata and controls

14 lines (11 loc) · 556 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
说简单点就是 定义其他注解的注解
比如Override这个注解就不是一个元注解而是通过元注解定义出来的
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE)
public @interface Override {
}
这里面的
@Target
@Retention
就是元注解
元注解有四个:@Target表示该注解可以用于什么地方)、@Retention表示再什么级别保存该注解信息)、@Documented将此注解包含再javadoc中)、@Inherited允许子类继承父类中的注解)。
Morty Proxy This is a proxified and sanitized view of the page, visit original site.