user1351578
user1351578

Reputation: 1

getting a dependency graph (inverse graph) by Spring framework

I'm using spring framework for a java project. I'm getting a .xml file, and by the code:

ClassPathXmlApplicationContext xmlApplicationContext;
xmlApplicationContext.getBeanFactory().getDependenciesForBean("name of the bean");

I'm getting a string array that holds all the names that current object depends on.

Can i get the opposite of the call above, meaning getting all the names of object that depends on the current object?

Thanks a lot.

Upvotes: 0

Views: 303

Answers (1)

Roger Lindsjö
Roger Lindsjö

Reputation: 11543

Have you looked further in the javadoc? I think it is the .getDependentBeans("name of bean") that you are looking for.

Upvotes: 2

Related Questions