Added generic class method snippet.