io.mybatis.provider.Style Maven / Gradle / Ivy
/*
* Copyright 2020-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.mybatis.provider;
import io.mybatis.config.ConfigHelper;
import io.mybatis.provider.util.ServiceLoaderUtil;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 默认提供的样式,自己可以通过 SPI 扩展
*/
public interface Style {
/**
* 默认配置对应的 key
*/
String DEFAULT_STYLE_KEY = "mybatis.provider.style";
/**
* 不做转换
*/
String NORMAL = "normal";
/**
* 驼峰转下划线
*/
String LOWER_UNDERSCORE = "lower_underscore";
/**
* 转小写
*/
String LOWER = "lower";
/**
* 转大写
*/
String UPPER = "upper";
/**
* 驼峰转大写下划线
*/
String UPPER_UNDERSCORE = "upper_underscore";
/**
* 初始化样式信息
*/
Map styleMap = new HashMap() {
{
List