# hasAlias method

1. @protected

bool hasAlias(

1. String name,
2. String alias

)

Determine whether the given name has the given alias registered.

Checks both direct aliases and transitive aliases (aliases of aliases).

## Parameters:

- `name`: The canonical name to check
- `alias`: The alias to check for

## Returns:

`true` if the alias is registered for the name (directly or transitively), `false` otherwise

## Example:

    final registry = SimpleAliasRegistry();
    registry.registerAlias('service', 'alias1');
    registry.registerAlias('alias1', 'alias2');

    print(registry.hasAlias('service', 'alias1')); // true - direct
    print(registry.hasAlias('service', 'alias2')); // true - transitive
    print(registry.hasAlias('service', 'nonexistent')); // false

## Implementation

    @protected
    bool hasAlias(String name, String alias) {
      return synchronized(this, () {
        final aliasMap = _getAliasMap();
        final registeredName = aliasMap[alias];
        return registeredName == name || (registeredName != null && hasAlias(name, registeredName));
      });
    }