Skip to content

Commit

Permalink
Rename methods of GenericUtils to better match use-case
Browse files Browse the repository at this point in the history
  • Loading branch information
Koboo committed Jan 28, 2023
1 parent 93bce40 commit 12d3c74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/eu/koboo/en2do/utility/GenericUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
@UtilityClass
public class GenericUtils {

public Class<?> getGenericTypeOfReturnList(Method method) {
public Class<?> getGenericTypeOfReturnType(Method method) {
Type returnType = method.getGenericReturnType();
ParameterizedType type = (ParameterizedType) returnType;
return (Class<?>) type.getActualTypeArguments()[0];
}

public Class<?> getGenericTypeOfParameterList(Method method, int paramIndex) {
public Class<?> getGenericTypeOfParameter(Method method, int paramIndex) {
Parameter parameter = method.getParameters()[paramIndex];
Type parameterType = parameter.getParameterizedType();
ParameterizedType type = (ParameterizedType) parameterType;
Expand Down

0 comments on commit 12d3c74

Please sign in to comment.