In Tool, call t.getClass to get its actual class.