When we create our custom plugins in Drupal 8, we sometimes need them to be executed in a particular order.
For example, if we would run a text analyzer that finds frequencies of words and frequent phrases, we would first want to run the HTML filter which strips out all tags and/or special characters and then execute the text analyzer. Whatever the reason be, Drupal 8 default plugin manager Drupal\Core\Plugin\DefaultPluginManager has a method called getDefinitions.