aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-01-06 08:16:52 +0000
committerMichael Williamson <mike@zwobble.org>2016-01-06 08:18:18 +0000
commite4229671c4cf6db860fc6cf68bcfb8fdd69fdcb8 (patch)
treeb8f61f97f0e9af47f90f49e0debaf061d07f9229 /src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java
parent5eafcf8cb10546916d4b38c3208ebfdfafff93e4 (diff)
Support method overloading in interpreter
Diffstat (limited to 'src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java')
-rw-r--r--src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java43
1 files changed, 10 insertions, 33 deletions
diff --git a/src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java b/src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java
index ddddd71..1bb934e 100644
--- a/src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java
+++ b/src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java
@@ -2,43 +2,20 @@ package org.zwobble.couscous.interpreter;
public final class NoSuchMethod extends InterpreterException {
private static final long serialVersionUID = 1L;
- private final String methodName;
+ private MethodSignature signature;
- public NoSuchMethod(final String methodName) {
- this.methodName = methodName;
+ public NoSuchMethod(MethodSignature signature) {
+ this.signature = signature;
}
- public String getMethodName() {
- return this.methodName;
+ public MethodSignature getSignature() {
+ return signature;
}
- @java.lang.Override
- public java.lang.String toString() {
- return "NoSuchMethod(methodName=" + this.getMethodName() + ")";
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object o) {
- if (o == this) return true;
- if (!(o instanceof NoSuchMethod)) return false;
- final NoSuchMethod other = (NoSuchMethod)o;
- if (!other.canEqual((java.lang.Object)this)) return false;
- final java.lang.Object this$methodName = this.getMethodName();
- final java.lang.Object other$methodName = other.getMethodName();
- if (this$methodName == null ? other$methodName != null : !this$methodName.equals(other$methodName)) return false;
- return true;
- }
-
- protected boolean canEqual(final java.lang.Object other) {
- return other instanceof NoSuchMethod;
- }
-
- @java.lang.Override
- public int hashCode() {
- final int PRIME = 59;
- int result = 1;
- final java.lang.Object $methodName = this.getMethodName();
- result = result * PRIME + ($methodName == null ? 43 : $methodName.hashCode());
- return result;
+ @Override
+ public String toString() {
+ return "NoSuchMethod(" +
+ "signature=" + signature +
+ ") " + super.toString();
}
} \ No newline at end of file