Class HyphenAliasGenerator
- java.lang.Object
-
- io.microsphere.spring.beans.factory.support.JoinAliasGenerator
-
- io.microsphere.spring.beans.factory.support.HyphenAliasGenerator
-
- All Implemented Interfaces:
ConfigurationBeanAliasGenerator
public class HyphenAliasGenerator extends JoinAliasGenerator
HyphenAliasGenerator
is an implementation ofJoinAliasGenerator
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 Constructor Description HyphenAliasGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
delimiter()
-
Methods inherited from class io.microsphere.spring.beans.factory.support.JoinAliasGenerator
generateAlias
-
-
-
-
Method Detail
-
delimiter
protected java.lang.String delimiter()
- Specified by:
delimiter
in classJoinAliasGenerator
-
-