# getAliases method

1. @override

List<String> getAliases(

1. String name

)
override

Retrieves all aliases registered for the given primary `name`.

Returns a list of all alternative names that have been registered for the specified primary `name`. If no aliases exist for the name, returns an empty list.

## Parameters:

- `name`: The primary name to retrieve aliases for

## Returns:

A list of alias strings for the given primary name, or an empty list if no aliases are registered.

## Example:

    final registry = MyAliasRegistry();
    registry.registerAlias('paymentGateway', 'payGateway');
    registry.registerAlias('paymentGateway', 'paymentProcessor');
    registry.registerAlias('paymentGateway', 'gateway');

    final aliases = registry.getAliases('paymentGateway');
    print(aliases); // ['payGateway', 'paymentProcessor', 'gateway']

    // For a name with no aliases
    final noAliases = registry.getAliases('shoppingCart');
    print(noAliases); // []

## Implementation

    @override
    List<String> getAliases(String name) {
      return synchronized(this, () {
        final aliasMap = _getAliasMap();
        final result = <String>[];
        _retrieveAliases(name, result, aliasMap);

        return List.unmodifiable(result);
      });
    }