This discussion is archived
1 Reply Latest reply: Jun 28, 2009 11:25 PM by 796365 RSS

find a loaded class

843798 Newbie
Currently Being Moderated
Hi all,

I am writing code to find the Class object of a loaded class given a class name for transformation, and I was going to use ClassLoader.findClass(..) but unfortunately it is protected. I could have done the same using Instrumentation.getAllLoadedClasses() and searching through the results each time, but that sounds wasteful. Is there any other way to accomplish this?

Thanks, Alvin