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
34 lines (30 loc) · 821 Bytes

File metadata and controls

34 lines (30 loc) · 821 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
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* @author LZD 2018/03/12
*/
/*
* 一个注解@Description的定义
*/
package Annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
// 作用域
@Target({ElementType.METHOD, ElementType.TYPE})
/*
* 作用时期(分为三种:SOURCE、CLASS和RUNTIME)
* 因为是使用反射解析注解,只有运行时的才可以看得到注解解析的结果,
* 无论是作用时期是SOURCE还是CLASS,它在运行时期都应消失了
*/
@Retention(RetentionPolicy.RUNTIME)
/*
* 注解的继承,有该注解就表名继承的时候把父类的注解也继承过来了,
* 案例证明,继承只会继承父类类上的注解,而不会继承方法上的注解
*/
@Inherited
@Documented
public @interface Description {
String value();
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.