Reputation: 4431
It's a java springboot application with intellij.
The problem is:
*by custom hack I mean that class instantiation seems completely random like:
-using @Autowired
-using getBean
-using @Autowired on a collection of interface implementations and just refering the instance by the index (lol)
@Autowired
List<MyInterface> myList
public doSomething(){
myList.get(0).calculate()
}
-using reflection:
val classToInstantiate = "<some_prefix>"+getMiddlePartWithSomeStupidLogic()+"<parameter_as_suffix>"
Class<?> cls = Class.forName(classToInstantiate);
cls.getConstructors()[0].newInstance(params..)
I feel that every package or class is written by different developer.
I feel completely impossible to explore the dead code in an easy way. So I started to do it by hand - like searching every field/class/method name by hand - but it would take weeks and it is still errorprone.
So is there an easy and fast way for this?
Upvotes: 0
Views: 88