What to use for plugin.provider? Name | Provider Object?

I’m working on a serverless plugin that is AWS specific.
According to the documentation here, provider specific plugins should supply the provider name as a property on the plugin.

class ProviderDeploy {
  constructor(serverless, options) {
    this.serverless = serverless;
    this.options = options;

    // set the providers name here
    this.provider = 'providerName';

This seems to conflict with the built-in AWS plugins. These seem to call getProvider(‘aws’). See the deploy plugin for example.

class AwsDeploy {
  constructor(serverless, options) {
    this.serverless = serverless;
    this.options = options;
    this.provider = this.serverless.getProvider('aws');

Which is correct or am I confusing apples and oranges?

I think the document is older.

Added the getProvider function as follow. But the document has not been updated.
https://github.com/serverless/serverless/commit/df7692ac809ead5febe1f59645ad9c3c901dcd3a#diff-f63d6ce6eb4e6337529123dd064ba480

I think that it is better to use the function to confirm existence of the provider.