Class SimpleAliasRegistry

    • Field Detail

      • logger

        protected final Log logger
        Logger available to subclasses.
    • Method Detail

      • allowAliasOverriding

        protected boolean allowAliasOverriding()
        Determine whether alias overriding is allowed.

        Default is true.

      • hasAlias

        public boolean hasAlias​(String name,
                                String alias)
        Determine whether the given name has the given alias registered.
        Parameters:
        name - the name to check
        alias - the alias to look for
        Since:
        4.2.1
      • isAlias

        public boolean isAlias​(String name)
        Description copied from interface: AliasRegistry
        Determine whether the given name is defined as an alias (as opposed to the name of an actually registered component).
        Specified by:
        isAlias in interface AliasRegistry
        Parameters:
        name - the name to check
        Returns:
        whether the given name is an alias
      • getAliases

        public String[] getAliases​(String name)
        Description copied from interface: AliasRegistry
        Return the aliases for the given name, if defined.
        Specified by:
        getAliases in interface AliasRegistry
        Parameters:
        name - the name to check for aliases
        Returns:
        the aliases, or an empty array if none
      • resolveAliases

        public void resolveAliases​(StringValueResolver valueResolver)
        Resolve all alias target names and aliases registered in this registry, applying the given StringValueResolver to them.

        The value resolver may for example resolve placeholders in target bean names and even in alias names.

        Parameters:
        valueResolver - the StringValueResolver to apply
      • canonicalName

        public String canonicalName​(String name)
        Determine the raw name, resolving aliases to canonical names.
        Parameters:
        name - the user-specified name
        Returns:
        the transformed name