Skip to content

Commit 7d3e495

Browse files
author
yusu
committed
refactor: format code for consistency and readability
1 parent b061d4b commit 7d3e495

119 files changed

Lines changed: 783 additions & 621 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/main/java/com/alibaba/compileflow/engine/ProcessEngine.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public interface ProcessEngine<T extends FlowModel> {
3030
/**
3131
* Executes a process flow with the given code and context.
3232
*
33-
* @param code Unique identifier of the process flow
33+
* @param code Unique identifier of the process flow
3434
* @param context Key-value pairs representing the execution context
3535
* @return Result of the execution as a map of key-value pairs
3636
*/
@@ -39,8 +39,8 @@ public interface ProcessEngine<T extends FlowModel> {
3939
/**
4040
* Triggers a process flow with a specific tag and context.
4141
*
42-
* @param code Unique identifier of the process flow
43-
* @param tag Identifier of the flow's tag
42+
* @param code Unique identifier of the process flow
43+
* @param tag Identifier of the flow's tag
4444
* @param context Key-value pairs representing the execution context
4545
* @return Result of the trigger as a map of key-value pairs
4646
*/
@@ -49,9 +49,9 @@ public interface ProcessEngine<T extends FlowModel> {
4949
/**
5050
* Triggers a process flow with a specific tag, event, and context.
5151
*
52-
* @param code Unique identifier of the process flow
53-
* @param tag Identifier of the flow's tag
54-
* @param event Event to trigger
52+
* @param code Unique identifier of the process flow
53+
* @param tag Identifier of the flow's tag
54+
* @param event Event to trigger
5555
* @param context Key-value pairs representing the execution context
5656
* @return Result of the trigger as a map of key-value pairs
5757
*/
@@ -68,7 +68,7 @@ public interface ProcessEngine<T extends FlowModel> {
6868
* Pre-compiles a set of process flows with a custom class loader.
6969
*
7070
* @param classLoader Custom class loader to use during compilation
71-
* @param codes Array of unique identifiers for process flows to compile
71+
* @param codes Array of unique identifiers for process flows to compile
7272
*/
7373
void preCompile(ClassLoader classLoader, String... codes);
7474

@@ -116,7 +116,7 @@ public interface ProcessEngine<T extends FlowModel> {
116116
/**
117117
* Executes a process flow with the given code, context, and BPM content.
118118
*
119-
* @param code Unique identifier of the process flow
119+
* @param code Unique identifier of the process flow
120120
* @param context Key-value pairs representing the execution context
121121
* @param content BPM content in string format
122122
* @return Result of the execution as a map of key-value pairs
@@ -126,8 +126,8 @@ public interface ProcessEngine<T extends FlowModel> {
126126
/**
127127
* Triggers a process flow with a specific tag, context, and BPM content.
128128
*
129-
* @param code Unique identifier of the process flow
130-
* @param tag Identifier of the flow's tag
129+
* @param code Unique identifier of the process flow
130+
* @param tag Identifier of the flow's tag
131131
* @param context Key-value pairs representing the execution context
132132
* @param content BPM content in string format
133133
* @return Result of the trigger as a map of key-value pairs
@@ -137,9 +137,9 @@ public interface ProcessEngine<T extends FlowModel> {
137137
/**
138138
* Triggers a process flow with a specific tag, event, context, and BPM content.
139139
*
140-
* @param code Unique identifier of the process flow
141-
* @param tag Identifier of the flow's tag
142-
* @param event Event to trigger
140+
* @param code Unique identifier of the process flow
141+
* @param tag Identifier of the flow's tag
142+
* @param event Event to trigger
143143
* @param context Key-value pairs representing the execution context
144144
* @param content BPM content in string format
145145
* @return Result of the trigger as a map of key-value pairs
@@ -156,15 +156,15 @@ public interface ProcessEngine<T extends FlowModel> {
156156
/**
157157
* Pre-compiles a set of process flows with their corresponding BPM content and a custom class loader.
158158
*
159-
* @param classLoader Custom class loader to use during compilation
159+
* @param classLoader Custom class loader to use during compilation
160160
* @param code2ContentMap Mapping between unique identifiers and BPM content strings
161161
*/
162162
void preCompile(ClassLoader classLoader, Map<String, String> code2ContentMap);
163163

164164
/**
165165
* Loads a process flow by its code and BPM content.
166166
*
167-
* @param code Unique identifier of the process flow to load
167+
* @param code Unique identifier of the process flow to load
168168
* @param content BPM content in string format
169169
* @return A flow model instance representing the loaded process flow with given content
170170
*/
@@ -173,7 +173,7 @@ public interface ProcessEngine<T extends FlowModel> {
173173
/**
174174
* Retrieves Java code representation of a process flow with its BPM content.
175175
*
176-
* @param code Unique identifier of the process flow
176+
* @param code Unique identifier of the process flow
177177
* @param content BPM content in string format
178178
* @return Java code as a string
179179
*/
@@ -182,7 +182,7 @@ public interface ProcessEngine<T extends FlowModel> {
182182
/**
183183
* Retrieves test code for a process flow with its BPM content.
184184
*
185-
* @param code Unique identifier of the process flow
185+
* @param code Unique identifier of the process flow
186186
* @param content BPM content in string format
187187
* @return Test code as a string
188188
*/

src/main/java/com/alibaba/compileflow/engine/common/ClassWrapper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ private static List<ClassWrapper> getClassParameterizedType(String name) {
102102
}
103103
int index = name.indexOf("<");
104104
return index == -1 ? Collections.emptyList() :
105-
Arrays.stream(name.substring(index + 1, name.lastIndexOf(">")).split(","))
106-
.map(String::trim).map(ClassWrapper::of).collect(Collectors.toList());
105+
Arrays.stream(name.substring(index + 1, name.lastIndexOf(">")).split(","))
106+
.map(String::trim).map(ClassWrapper::of).collect(Collectors.toList());
107107
}
108108

109109
public String getName() {
@@ -152,7 +152,7 @@ public String getBaseShortName() {
152152

153153
if (CollectionUtils.isNotEmpty(parameterizedType)) {
154154
sb.append("<").append(parameterizedType.stream().map(ClassWrapper::getBaseShortName)
155-
.collect(Collectors.joining(", "))).append(">");
155+
.collect(Collectors.joining(", "))).append(">");
156156
}
157157

158158
return sb.toString();

src/main/java/com/alibaba/compileflow/engine/common/DirectedGraph.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ public boolean remove(Edge<V> edge) {
6464

6565
public Map<V, Integer> inDegree() {
6666
return neighbors.entrySet().stream().collect(
67-
Collectors.toMap(Map.Entry::getKey, e -> e.getValue().getIncomings().size()));
67+
Collectors.toMap(Map.Entry::getKey, e -> e.getValue().getIncomings().size()));
6868
}
6969

7070
public Map<V, Integer> outDegree() {
7171
return neighbors.entrySet().stream().collect(
72-
Collectors.toMap(Map.Entry::getKey, e -> e.getValue().getOutgoings().size()));
72+
Collectors.toMap(Map.Entry::getKey, e -> e.getValue().getOutgoings().size()));
7373
}
7474

7575
public List<V> topSort() {

0 commit comments

Comments
 (0)