Skip to content

Commit ec738b0

Browse files
fix
1 parent 609837d commit ec738b0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/main/java/top/rgb39/ecs/executor/ParameterImplementor.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public Object invoke(Object target, Method method) throws Exception {
4141
public ParameterImplementor matchArgumentsOnlyReflect(App app) {
4242
for (int i = 0; i < this.params.length; i++) {
4343
Parameter param = this.params[i];
44-
matchReflects(args, param, i, app, null);
44+
matchReflect(args, param, i, app, null);
4545
}
4646
return this;
4747
}
@@ -59,7 +59,7 @@ public ParameterImplementor matchArguments(App app, long entityId) {
5959
return this;
6060
}
6161

62-
private boolean matchReflects(List<Object> args, Parameter param, int index, App app, @Nullable Long entityId) {
62+
public static boolean matchReflect(List<Object> args, Parameter param, int index, App app, @Nullable Long entityId) {
6363
Reflect reflect = (Reflect) param.getAnnotation(Reflect.class);
6464

6565
if (Objects.isNull(reflect)) {
@@ -77,7 +77,9 @@ private boolean matchReflects(List<Object> args, Parameter param, int index, App
7777
return false;
7878
}
7979

80-
private static final List<ParameterMatcher> matchers = new ArrayList<>();
80+
private static final List<ParameterMatcher> matchers = new ArrayList<>() {{
81+
add(ParameterImplementor::matchReflect);
82+
}};
8183

8284
public static void registerMatcher(ParameterMatcher matcher) {
8385
matchers.add(matcher);

0 commit comments

Comments
 (0)