How do I automatically set the debug id on an developed vaadin application?

I need to implement Selenium (not Testbench) on a Vaadin application without using XPATH to locate the dom elements. I was looking for an alternative to manually set the debugID to all the controls of the application which is already developed and it doesnt have this property defined. I was thinking on creating custom controls to set the debugID on the constructor of my extended class but, I need to know in this method, which class is instantiating the object so, I can use it as part of the debug id itself. I have already discarded using sun.reflect.Reflection.getCallerClass because afect the performance of the application. Thanks in advance.

Would the IdCreator add-on do what you need?!addon/idcreator