diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/MethodInvocation.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/MethodInvocation.java index b3602d0c3..0214b3529 100644 --- a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/MethodInvocation.java +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/MethodInvocation.java @@ -62,6 +62,7 @@ public OperationType getOperationType() { return OperationType.QUERY; } + @Override public String getName() { return queryName() .orElseGet(() -> mutationName() @@ -93,6 +94,7 @@ private Optional subscriptionName() { return Optional.empty(); } + @Override public String getRawName() { String name = method.getName(); if (name.startsWith("get") && name.length() > 3 && Character.isUpperCase(name.charAt(3))) @@ -100,10 +102,6 @@ public String getRawName() { return name; } - public boolean isRenamed() { - return !getName().equals(getRawName()); - } - public TypeInfo getReturnType() { return new TypeInfo(type, method.getGenericReturnType(), method.getAnnotatedReturnType()); } diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/NamedElement.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/NamedElement.java index da32503e3..97937ae11 100644 --- a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/NamedElement.java +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/NamedElement.java @@ -5,5 +5,7 @@ public interface NamedElement { String getRawName(); - boolean isRenamed(); + default boolean isRenamed() { + return !getName().equals(getRawName()); + } } diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/ParameterInfo.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/ParameterInfo.java index 0ed5ecad5..a09dda34c 100644 --- a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/ParameterInfo.java +++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/typesafe/reflection/ParameterInfo.java @@ -141,11 +141,6 @@ public String getRawName() { return parameter.getName(); } - @Override - public boolean isRenamed() { - return !getName().equals(getRawName()); - } - public A[] getAnnotations(Class type) { return parameter.getAnnotationsByType(type); }