-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐳 refactor(GenerateDoc): Improved generated documentation
- Loading branch information
Showing
17 changed files
with
92 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
import lombok.ToString; | ||
|
||
/** | ||
* boolean 包装类 | ||
* boolean value | ||
* | ||
* @author 渔民小镇 | ||
* @date 2023-02-07 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
import java.util.List; | ||
|
||
/** | ||
* boolean list 包装类 | ||
* boolean list | ||
* | ||
* @author 渔民小镇 | ||
* @date 2023-02-07 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
import java.util.List; | ||
|
||
/** | ||
* 对象类型的包装类 | ||
* object | ||
* | ||
* @author 渔民小镇 | ||
* @date 2023-04-17 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
import lombok.ToString; | ||
|
||
/** | ||
* int 包装类 | ||
* int value | ||
* | ||
* @author 渔民小镇 | ||
* @date 2023-02-10 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
import java.util.List; | ||
|
||
/** | ||
* int list 包装类 | ||
* int list | ||
* | ||
* @author 渔民小镇 | ||
* @date 2023-02-10 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
import java.util.List; | ||
|
||
/** | ||
* long list 包装类 | ||
* long list | ||
* | ||
* @author 渔民小镇 | ||
* @date 2023-02-10 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
import lombok.ToString; | ||
|
||
/** | ||
* string 包装类 | ||
* string value | ||
* | ||
* @author 渔民小镇 | ||
* @date 2023-02-05 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
import java.util.List; | ||
|
||
/** | ||
* string list 包装类 | ||
* string list | ||
* | ||
* @author 渔民小镇 | ||
* @date 2023-02-05 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
...ht-jprotobuf/src/main/java/com/iohao/game/widget/light/protobuf/ProtoGenerateSetting.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* ioGame | ||
* Copyright (C) 2021 - present 渔民小镇 (262610965@qq.com、luoyizhu@gmail.com) . All Rights Reserved. | ||
* # iohao.com . 渔民小镇 | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
package com.iohao.game.widget.light.protobuf; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.experimental.UtilityClass; | ||
|
||
import java.util.function.Function; | ||
|
||
/** | ||
* @author 渔民小镇 | ||
* @date 2024-10-31 | ||
* @since 21.20 | ||
*/ | ||
@UtilityClass | ||
public final class ProtoGenerateSetting { | ||
@Setter | ||
@Getter | ||
Function<FieldNameGenerate, String> fieldNameFunction = fieldNameGenerate -> { | ||
if (fieldNameGenerate.isEnum()) { | ||
return fieldNameGenerate.getFieldName(); | ||
} | ||
|
||
// default UnderScoreCase | ||
StringBuilder result = new StringBuilder(); | ||
String fieldName = fieldNameGenerate.getFieldName(); | ||
|
||
for (int i = 0; i < fieldName.length(); i++) { | ||
char c = fieldName.charAt(i); | ||
if (Character.isUpperCase(c)) { | ||
if (i > 0) { | ||
result.append('_'); | ||
} | ||
|
||
result.append(Character.toLowerCase(c)); | ||
} else { | ||
result.append(c); | ||
} | ||
} | ||
|
||
return result.toString(); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters