Created
November 14, 2015 00:21
-
-
Save taichi/963d031f32679fd75b38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
String[] tmpl = { // | |
"public void %s(CharSequence msg) {this.delegate.printMessage(Kind.%s, msg, null);}", | |
"public void %s(Supplier<CharSequence> msg) {this.delegate.printMessage(Kind.%s, msg.get(), null);}", | |
"public void %s(CharSequence msg,Element e) {this.delegate.printMessage(Kind.%s, msg, e);}", | |
"public void %s(Supplier<CharSequence> msg,Element e) {this.delegate.printMessage(Kind.%s, msg.get(), e);}", | |
"public void %s(CharSequence msg,Element e,AnnotationMirror a) {this.delegate.printMessage(Kind.%s, msg, e, a);}", | |
"public void %s(Supplier<CharSequence> msg,Element e,AnnotationMirror a) {this.delegate.printMessage(Kind.%s, msg.get(), e, a);}", | |
"public void %s(CharSequence msg,Element e,AnnotationMirror a,AnnotationValue v) {this.delegate.printMessage(Kind.%s, msg, e, a, v);}", | |
"public void %s(Supplier<CharSequence> msg,Element e,AnnotationMirror a,AnnotationValue v) {this.delegate.printMessage(Kind.%s, msg.get(), e, a, v);}",// | |
}; | |
String[][] vals = { { "debug", "OTHER" }, { "info", "NOTE" }, { "warn", "WARNING" }, { "error", "ERROR" }, }; | |
for (String[] v : vals) | |
{ | |
for (String t : tmpl) { | |
System.out.printf(t, v[0], v[1]); | |
System.out.println(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment