Class HyphenAliasGenerator
java.lang.Object
io.microsphere.spring.beans.factory.support.JoinAliasGenerator
io.microsphere.spring.beans.factory.support.HyphenAliasGenerator
- All Implemented Interfaces:
ConfigurationBeanAliasGenerator
HyphenAliasGenerator
is an implementation of JoinAliasGenerator
that uses a hyphen ("-") as the separator between bean name parts.
This class is typically used in Spring's bean alias generation process to create aliases by joining parts of bean names with a hyphen. For example, a bean named "userService" might be aliased as "user-service" if it's split into parts and joined using this generator.
Example Usage
// Given a bean name "myCustomService"
String[] parts = {"my", "custom", "service"};
String alias = new HyphenAliasGenerator().generate(parts);
System.out.println(alias); // Output: "my-custom-service"
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.microsphere.spring.beans.factory.support.JoinAliasGenerator
generateAlias
-
Constructor Details
-
HyphenAliasGenerator
public HyphenAliasGenerator()
-
-
Method Details
-
delimiter
- Specified by:
delimiter
in classJoinAliasGenerator
-