add sample main
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
build
|
||||
classes
|
||||
out
|
||||
.DS_Store
|
||||
.gradle
|
||||
.classpath
|
||||
|
||||
18
src/main/java/me/hatter/sample/reflections/Main.java
Normal file
18
src/main/java/me/hatter/sample/reflections/Main.java
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user