Skip to content

Commit 00fed25

Browse files
committed
upload custom annotation demo
运行时自定义注解 编译时自定义注解与注解处理器
1 parent 2b8ff61 commit 00fed25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1100
-0
lines changed

CustomAnnotationDemo/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild
Binary file not shown.

CustomAnnotationDemo/.idea/codeStyles/Project.xml

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CustomAnnotationDemo/.idea/gradle.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CustomAnnotationDemo/.idea/misc.xml

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CustomAnnotationDemo/.idea/modules.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CustomAnnotationDemo/.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apply plugin: 'java-library'
2+
3+
dependencies {
4+
implementation fileTree(dir: 'libs', include: ['*.jar'])
5+
}
6+
7+
sourceCompatibility = "1.7"
8+
targetCompatibility = "1.7"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.hht.annotationprocessor;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import java.lang.annotation.Target;
7+
8+
/**
9+
* @author Realmo
10+
* @version 1.0.0
11+
* @name Demo
12+
* @email momo.weiye@gmail.com
13+
* @time 2018/7/27 9:51
14+
* @describe
15+
*/
16+
17+
@Retention(RetentionPolicy.CLASS)
18+
@Target({ElementType.FIELD,ElementType.METHOD})
19+
public @interface ClassAnnotation {
20+
21+
22+
int value() default 1;
23+
}

0 commit comments

Comments
 (0)