mirror of
https://github.com/CarmJos/EasySQL.git
synced 2026-06-05 00:25:32 +08:00
[v0.3.1] 修复一些小的规范问题
This commit is contained in:
@@ -28,7 +28,7 @@ public enum ForeignKeyRule {
|
|||||||
*/
|
*/
|
||||||
CASCADE("CASCADE");
|
CASCADE("CASCADE");
|
||||||
|
|
||||||
String ruleName;
|
final String ruleName;
|
||||||
|
|
||||||
ForeignKeyRule(String ruleName) {
|
ForeignKeyRule(String ruleName) {
|
||||||
this.ruleName = ruleName;
|
this.ruleName = ruleName;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public enum IndexType {
|
|||||||
FULLTEXT_INDEX("FULLTEXT");
|
FULLTEXT_INDEX("FULLTEXT");
|
||||||
|
|
||||||
|
|
||||||
String name;
|
final String name;
|
||||||
|
|
||||||
IndexType(String name) {
|
IndexType(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|||||||
@@ -9,12 +9,14 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.annotations.TestOnly;
|
import org.jetbrains.annotations.TestOnly;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@TestOnly
|
@TestOnly
|
||||||
|
@SuppressWarnings("all")
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
@@ -85,8 +87,8 @@ public class Main {
|
|||||||
public static @Nullable EasySQLTest cast(@NotNull Class<?> value) {
|
public static @Nullable EasySQLTest cast(@NotNull Class<?> value) {
|
||||||
if (!EasySQLTest.class.isAssignableFrom(value)) return null;
|
if (!EasySQLTest.class.isAssignableFrom(value)) return null;
|
||||||
try {
|
try {
|
||||||
return (EasySQLTest) value.newInstance();
|
return (EasySQLTest) value.getDeclaredConstructor().newInstance();
|
||||||
} catch (InstantiationException | IllegalAccessException e) {
|
} catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user