• Post Reply Bookmark Topic Watch Topic
  • New Topic

If changing bytes of of class in loadClass, do I "re"-define?

 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to alter the bytes of a class in my ClassLoader's loadClass method. However, it will already have been defined by the parent classloader.
1. Is it possible to re-define that class? (Since I control the loading)
2. Do I just return the byte-altered class?
3. Do I define this altered class as a diff name and define that and just return that when people ask for the original class?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!