Extract linkto class mappping to a method

With this change we can easily understand that setAttribute is used for linkto feature.