if you have no control over that class then i gues...
# codereview
c
if you have no control over that class then i guess the best you can do is what you suggested