add sample main

This commit is contained in:
2019-11-17 00:25:04 +08:00
parent 1e324dae15
commit e30ce78848
2 changed files with 20 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
build
classes
out
.DS_Store
.gradle
.classpath

View File

@@ -0,0 +1,18 @@
package me.hatter.sample.reflections;
import me.hatter.tools.commons.bean.annotation.CommonService;
import org.reflections.Reflections;
import java.util.Set;
@CommonService
public class Main {
public static void main(String[] args) {
Reflections reflections = new Reflections("me.hatter");
Set<Class<?>> annotated = reflections.getTypesAnnotatedWith(CommonService.class);
System.out.println(annotated);
}
}