Reflection and dynamically changing classes