diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-10-25 19:18:09 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-10-25 19:34:44 +0000 |
| commit | 368f2dd010defaf5f4b6deb70f45285cee8f244d (patch) | |
| tree | 55494f85341f23dd1e588fa070ef863ef7cfdef5 /src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java | |
| parent | 060ae04a695df6abac7445df3c5394b59da40f41 (diff) | |
Remove lombok
Diffstat (limited to 'src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java')
| -rw-r--r-- | src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java b/src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java index e69c978..ddddd71 100644 --- a/src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java +++ b/src/main/java/org/zwobble/couscous/interpreter/NoSuchMethod.java @@ -1,12 +1,44 @@ package org.zwobble.couscous.interpreter; -import lombok.EqualsAndHashCode; -import lombok.Value; - -@Value -@EqualsAndHashCode(callSuper=false) -public class NoSuchMethod extends InterpreterException { +public final class NoSuchMethod extends InterpreterException { private static final long serialVersionUID = 1L; + private final String methodName; + + public NoSuchMethod(final String methodName) { + this.methodName = methodName; + } + + public String getMethodName() { + return this.methodName; + } + + @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; + } - String methodName; -} + @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; + } +}
\ No newline at end of file |
