mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
POJO to help with checking that expansions have all required methods implemented.
This commit is contained in:
parent
252802dcbe
commit
94bf5fea57
@ -0,0 +1,37 @@
|
|||||||
|
package me.clip.placeholderapi.expansion.manager;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public final class MethodSignature {
|
||||||
|
private final String name;
|
||||||
|
private final Class<?>[] params;
|
||||||
|
|
||||||
|
protected MethodSignature(String name, Class<?>[] params) {
|
||||||
|
this.name = name;
|
||||||
|
this.params = params;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class<?>[] getParams() {
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
MethodSignature that = (MethodSignature) o;
|
||||||
|
return Objects.equals(name, that.name) && Arrays.equals(params, that.params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = Objects.hash(name);
|
||||||
|
result = 31 * result + Arrays.hashCode(params);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user