From 274bd2755b8f4b372b96912dee08e4ded6da16b7 Mon Sep 17 00:00:00 2001 From: Rsl1122 <24460436+Rsl1122@users.noreply.github.com> Date: Sun, 26 Jan 2020 23:00:56 +0200 Subject: [PATCH] Renamed Parameters#call to #usingOn --- .../extension/implementation/providers/MethodWrapper.java | 4 ++-- .../extension/implementation/providers/Parameters.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/MethodWrapper.java b/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/MethodWrapper.java index 33374c5ae..8fdedf90d 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/MethodWrapper.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/MethodWrapper.java @@ -41,9 +41,9 @@ public class MethodWrapper { methodType = MethodType.forMethod(this.method); } - public T callMethod(DataExtension of, Parameters with) { + public T callMethod(DataExtension extension, Parameters with) { try { - return returnType.cast(with.call(of, method)); + return returnType.cast(with.usingOn(extension, method)); } catch (InvocationTargetException notReadyToBeCalled) { if (notReadyToBeCalled.getCause() instanceof NotReadyException) { return null; // Data or API not available to make the call. diff --git a/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/Parameters.java b/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/Parameters.java index f5341791e..009c302cc 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/Parameters.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/Parameters.java @@ -37,7 +37,7 @@ public interface Parameters { return new GroupParameters(serverUUID, groupName); } - Object call(DataExtension extension, Method method) throws InvocationTargetException, IllegalAccessException; + Object usingOn(DataExtension extension, Method method) throws InvocationTargetException, IllegalAccessException; MethodType getMethodType(); @@ -59,7 +59,7 @@ public interface Parameters { } @Override - public Object call(DataExtension extension, Method method) throws InvocationTargetException, IllegalAccessException { + public Object usingOn(DataExtension extension, Method method) throws InvocationTargetException, IllegalAccessException { return method.invoke(extension); } @@ -89,7 +89,7 @@ public interface Parameters { } @Override - public Object call(DataExtension extension, Method method) throws InvocationTargetException, IllegalAccessException { + public Object usingOn(DataExtension extension, Method method) throws InvocationTargetException, IllegalAccessException { Class parameterType = method.getParameterTypes()[0]; if (UUID.class.equals(parameterType)) { return method.invoke(extension, playerUUID); @@ -118,7 +118,7 @@ public interface Parameters { } @Override - public Object call(DataExtension extension, Method method) throws InvocationTargetException, IllegalAccessException { + public Object usingOn(DataExtension extension, Method method) throws InvocationTargetException, IllegalAccessException { Group group = this::getGroupName; return method.invoke(extension, group); }