16
16
package io .micronaut .data .intercept ;
17
17
18
18
import io .micronaut .core .annotation .Internal ;
19
- import io .micronaut .core .type .Argument ;
20
19
import io .micronaut .inject .ExecutableMethod ;
21
20
22
- import java .util .Arrays ;
23
21
import java .util .Objects ;
24
22
25
23
/**
31
29
@ Internal
32
30
public final class RepositoryMethodKey {
33
31
private final Class <?> repositoryClass ;
34
- private final String repositoryMethodName ;
35
- private final Argument <?>[] repositoryMethodArguments ;
32
+ private final ExecutableMethod <?, ?> method ;
36
33
private final int hashCode ;
37
34
38
35
/**
@@ -41,9 +38,8 @@ public final class RepositoryMethodKey {
41
38
*/
42
39
public RepositoryMethodKey (Object repository , ExecutableMethod <?, ?> method ) {
43
40
this .repositoryClass = repository .getClass ();
44
- this .repositoryMethodName = method .getName ();
45
- this .repositoryMethodArguments = method .getArguments ();
46
- this .hashCode = Objects .hash (repositoryClass , repositoryMethodName , repositoryMethodArguments .length );
41
+ this .method = method ;
42
+ this .hashCode = Objects .hash (repositoryClass , method .getName (), method .getArguments ().length );
47
43
}
48
44
49
45
@@ -54,8 +50,7 @@ public boolean equals(Object o) {
54
50
}
55
51
RepositoryMethodKey that = (RepositoryMethodKey ) o ;
56
52
return Objects .equals (repositoryClass , that .repositoryClass )
57
- && Objects .equals (repositoryMethodName , that .repositoryMethodName )
58
- && Objects .deepEquals (repositoryMethodArguments , that .repositoryMethodArguments );
53
+ && Objects .equals (method , that .method );
59
54
}
60
55
61
56
@ Override
0 commit comments