com.iih5.smartorm.generator.JavaKeyword Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smart-orm Show documentation
Show all versions of smart-orm Show documentation
这是一个ORM模型组件,可快速实现SQL操作,目前支持mysql,NoSQL库目前支持Redis
package com.iih5.smartorm.generator;
/*
* Copyright 2016 xueyi ([email protected])
*
* The SmartORM Project licenses this file to you 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.
*/
import com.iih5.smartorm.kit.StringKit;
import java.util.HashSet;
import java.util.Set;
/**
* JavaKeyword.JAVA敏感词列表
*/
public class JavaKeyword {
private static String[] keywordArray = {
"abstract",
"assert",
"boolean",
"break",
"byte",
"case",
"catch",
"char",
"class",
"const",
"continue",
"default",
"do",
"double",
"else",
"enum",
"extends",
"final",
"finally",
"float",
"for",
"goto",
"if",
"implements",
"import",
"instanceof",
"int",
"interface",
"long",
"native",
"new",
"package",
"private",
"protected",
"public",
"return",
"strictfp",
"short",
"static",
"super",
"switch",
"synchronized",
"this",
"throw",
"throws",
"transient",
"try",
"void",
"volatile",
"while"
};
private static Set set = initKeyword();
private static Set initKeyword() {
HashSet ret = new HashSet();
for (String keyword : keywordArray) {
ret.add(keyword);
}
return ret;
}
public static boolean contains(String str) {
return set.contains(str);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy