2

Basically I have a parent class Entity with a method test in it. I have a subclass MoreSpecificEntity, and I have a bunch of calls to MoreSpecificEntity.test and OtherEntity.test. Neither class overrides the test method, and I want to single out calls to MoreSpecificEntity.test by overriding the test method in MoreSpecificEntity. I am not allowed to edit and recompile the source code for licensing reasons, but I am allowed to do bytecode manipulation, so I'm using javassist. How can I override a method with javassist? Is it even possible?

0 Answers0