TL;DR: Make the decorator set a property in the class and look for it.
While trying my hand at writing an ORM, I had a problem of initialising the database through a dummy instantiation of some models, without running an explicit command. In java, I can use code generation