I want to create an decorator that can decorate select node only, what should I do?

I want to create an decorator that can decorate select node only, what should I do?