Added const version of getComponent