简体   繁体   中英

How to scan for classes in current project before compilation from maven custom plugin?

  1. Before compilation ( Class.forName(...) or similar doesn't work)
  2. I want to find specific class and check return type for specific method

eg

I am looking class Foo method foo and return type Bar - eg

package test;

import something.*
import another.something.*
import yet.another.something.*

public class Foo {
   public static Bar foo() {
       return new Bar();
   }
}

Q: How to find Bar class in all imports in EASY way ?

Class test.Foo is not compiled and some packages from imports are compiled some not.

看看org.reflections库...我曾经扫描过软件包以热插拔新功能。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM