class ComponentNameFactory {
    /**
     * Create ComponentName by component type and class type.
     *
     * @param type component type
     * @param clazz clazz
     */
    public static ComponentName createComponentName(ComponentType type, Class<?> clazz) {
        return new ComponentName(type, mergeComponentName(clazz, null));
    }

    /**
     * Create ComponentName by component type and component name.
     *
     * @param type component type
     * @param name name
     * @return component name
     */
    public static ComponentName createComponentName(ComponentType type, String name) {
        return new ComponentName(type, name);
    }

    /**
     * Create ComponentName by component type,class type and unique id.
     *
     * @param type component type
     * @param clazz clazz
     * @param uniqueId unique id
     */
    public static ComponentName createComponentName(ComponentType type, Class<?> clazz,
                                                    String uniqueId) {
        return new ComponentName(type, mergeComponentName(clazz, uniqueId));
    }

    /**
     * Create ComponentName by class type and unique id.
     *
     * @param clazz clazz
     * @param uniqueId unique id
     */
    private static String mergeComponentName(Class<?> clazz, String uniqueId) {<FILL_FUNCTION_BODY>}
}

        String ret = clazz.getName();
        if (StringUtils.hasText(uniqueId)) {
            ret += ":" + uniqueId;
        }
        return ret;
    
<no_super_class>