AliasRegistry interface.
Serves as base class for
org.
implementations.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | aliasMap
Map from alias to canonical name. |
| protected final Log | logger
Logger available to subclasses. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | |
| public String | Returns: the transformed namethe user-specified name name)Determine the raw name, resolving aliases to canonical names. |
| protected void | checkForAliasCircle(String
the candidate name name, String the candidate alias alias)Check whether the given name points back to the given alias as an alias in the other direction already, catching a circular reference upfront and throwing a corresponding IllegalStateException. |
| public String[] | getAliases(String
the name to check for aliases name)Implements org. |
| public boolean | |
| public boolean | isAlias(String
the name to check name)Implements org. |
| public void | registerAlias(String
the canonical name name, String the alias to be registered alias)Implements org. |
| public void | removeAlias(String
the alias to remove alias)Implements org. |
| public void | resolveAliases(StringValueResolver
the StringValueResolver to apply valueResolver)Resolve all alias target names and aliases registered in this
registry, applying the given |
| private void | retrieveAliases(String
the target name to find aliases for name, List<String> the resulting aliases list result)Transitively retrieve all aliases for the given name. |
| aliasMap | back to summary |
|---|---|
| private final Map<String, String> aliasMap Map from alias to canonical name. | |
| logger | back to summary |
|---|---|
| protected final Log logger Logger available to subclasses. | |
| SimpleAliasRegistry | back to summary |
|---|---|
| public SimpleAliasRegistry() | |
| allowAliasOverriding | back to summary |
|---|---|
| protected boolean allowAliasOverriding() Determine whether alias overriding is allowed. Default is | |
| canonicalName | back to summary |
|---|---|
| public String canonicalName(String name) Determine the raw name, resolving aliases to canonical names. | |
| checkForAliasCircle | back to summary |
|---|---|
| protected void checkForAliasCircle(String name, String alias) Check whether the given name points back to the given alias as an alias in the other direction already, catching a circular reference upfront and throwing a corresponding IllegalStateException.
| |
| getAliases | back to summary |
|---|---|
| public String[] getAliases(String name) Implements org. Doc from org. Return the aliases for the given name, if defined. | |
| hasAlias | back to summary |
|---|---|
| public boolean hasAlias(String name, String alias) Determine whether the given name has the given alias registered. | |
| isAlias | back to summary |
|---|---|
| public boolean isAlias(String name) Implements org. Doc from org. Determine whether the given name is defined as an alias (as opposed to the name of an actually registered component). | |
| registerAlias | back to summary |
|---|---|
| public void registerAlias(String name, String alias) Implements org. Doc from org. Given a name, register an alias for it. | |
| removeAlias | back to summary |
|---|---|
| public void removeAlias(String alias) Implements org. Doc from org. Remove the specified alias from this registry. | |
| resolveAliases | back to summary |
|---|---|
| public void resolveAliases(StringValueResolver valueResolver) Resolve all alias target names and aliases registered in this
registry, applying the given The value resolver may for example resolve placeholders in target bean names and even in alias names.
| |
| retrieveAliases | back to summary |
|---|---|
| private void retrieveAliases(String name, List<String> result) Transitively retrieve all aliases for the given name. | |