diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-02-11 22:34:48 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-02-11 22:34:48 +0100 |
commit | aafd83079a3000d3deb6e40a182849da2509fbfb (patch) | |
tree | cf87951eee9bb098bb96ecc3c02c6f1ab34c405d /test/core/src/lombok/CompilerMessage.java | |
parent | ef8769d3180b2c6de91a64f69dfa23a2e6e449b9 (diff) | |
download | lombok-aafd83079a3000d3deb6e40a182849da2509fbfb.tar.gz lombok-aafd83079a3000d3deb6e40a182849da2509fbfb.tar.bz2 lombok-aafd83079a3000d3deb6e40a182849da2509fbfb.zip |
BIG commit:
* re-introduction of onMethod/onConstructor/onParam
* tests checking error/warnings rewritten to be more heuristic, in order to accomodate difference in messaging between java6 and java 7
* Ability to eliminate java's own output of erroneous error messages (heh); i.e. those messages that are invalidated by lombok's actions. This mechanism is used for onMethod/onConstructor/onParam
* First steps to unifying a billion setGeneratedBy calls into a single visitor traversal for eclipse' HandleGetter/Setter/Constructor/Wither
* To simplify 'zooming in' the tests on just a few files, added an 'accept' mechanism.
* Updated copyright headers of website to 2013.
Diffstat (limited to 'test/core/src/lombok/CompilerMessage.java')
-rw-r--r-- | test/core/src/lombok/CompilerMessage.java | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/test/core/src/lombok/CompilerMessage.java b/test/core/src/lombok/CompilerMessage.java deleted file mode 100644 index d04d17f1..00000000 --- a/test/core/src/lombok/CompilerMessage.java +++ /dev/null @@ -1,50 +0,0 @@ -package lombok; - -public final class CompilerMessage { - /** Line Number (starting at 1) */ - final long line; - - /** Position is either column number, OR position in file starting from the first byte. */ - final long position; - final boolean isError; - final String message; - - public CompilerMessage(long line, long position, boolean isError, String message) { - this.line = line; - this.position = position; - this.isError = isError; - this.message = message; - } - - @Override public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + (isError ? 1231 : 1237); - result = prime * result + (int) (line ^ (line >>> 32)); - result = prime * result + ((message == null) ? 0 : message.hashCode()); - result = prime * result + (int) (position ^ (position >>> 32)); - return result; - } - - @Override public boolean equals(Object obj) { - if (this == obj) return true; - if (obj == null) return false; - if (getClass() != obj.getClass()) return false; - CompilerMessage other = (CompilerMessage) obj; - if (isError != other.isError) return false; - if (line != other.line) return false; - if (message == null) { - if (other.message != null) return false; - } else if (!message.equals(other.message)) return false; - if (position != other.position) return false; - return true; - } - - public CompilerMessageMatcher asCompilerMessageMatcher() { - return new CompilerMessageMatcher(line, position, message); - } - - @Override public String toString() { - return String.format("%d:%d %s %s", line, position, isError ? "ERROR" : "WARNING", message); - } -} |