Skip to content

Commit

Permalink
removed debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
cyklon73 committed Feb 4, 2024
1 parent aa7cee3 commit c0ca9fd
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/main/java/de/cyklon/jevent/JEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,9 @@ private <D> void registerListener(@NotNull ReflectClass<D> clazz) {
Class<?> internal = param.getReturnType().getInternal();
Object obj;
ParameterInstance pi;
if (EventManager.class.equals(internal)) {
obj = this;
System.out.println("put constructor parameter EventManager");
}
else if ((pi = param.getAnnotation(ParameterInstance.class)) != null) {
obj = getParameterInstance(pi.value());
System.out.println("put constructor parameter with ParameterInstance value");
}
else {
obj = getParameterInstance(internal.getName());
System.out.printf("put constructor parameter with class name (%s)", internal.getName());
}
if (EventManager.class.equals(internal)) obj = this;
else if ((pi = param.getAnnotation(ParameterInstance.class)) != null) obj = getParameterInstance(pi.value());
else obj = getParameterInstance(internal.getName());
params[i] = obj;
}
instance = con.newInstance(params);
Expand Down Expand Up @@ -140,7 +131,6 @@ public boolean callEvent(@NotNull Event event) {

@Override
public void registerParameterInstance(@NotNull String key, Object instance) {
System.out.printf("register instance with key '%s' for instance '%s'%n", key, instance);
parameterInstances.put(key, instance);
}

Expand All @@ -151,7 +141,6 @@ public void registerParameterInstance(@NotNull String key, Object instance) {

@Override
public @Nullable Object getParameterInstance(String key) {
System.out.printf("get parameter instance with key '%s', with result '%s'", key, parameterInstances.get(key));
return parameterInstances.get(key);
}
}

0 comments on commit c0ca9fd

Please sign in to comment.