Generally you should follow the Spring principles and keep obtaining the correct class as unobtrusive as possible. Meaning that as little classes as possible should depend on the Spring Framework APIs (maybe add a ClassLocator and a SpringProxyClassLocator implementation).