Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/Log.java @ 8252:0905d796944a
Refactored codegen error model to make error redirection a lot easier.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 13 Mar 2013 19:58:28 +0100 |
parents | f81be78f15a5 |
children | 8a1115c92271 |
comparison
equal
deleted
inserted
replaced
8251:cb70ed101b5f | 8252:0905d796944a |
---|---|
39 | 39 |
40 public Log(ProcessingEnvironment env) { | 40 public Log(ProcessingEnvironment env) { |
41 this.processingEnv = env; | 41 this.processingEnv = env; |
42 } | 42 } |
43 | 43 |
44 public void warning(Element element, String format, Object... args) { | |
45 message(Kind.WARNING, element, null, null, format, args); | |
46 } | |
47 | |
48 public void warning(Element element, AnnotationMirror mirror, String format, Object... args) { | |
49 message(Kind.WARNING, element, mirror, null, format, args); | |
50 } | |
51 | |
52 public void error(Element element, String format, Object... args) { | |
53 message(Kind.ERROR, element, null, null, format, args); | |
54 } | |
55 | |
56 public void error(String format, Object... args) { | |
57 message(Kind.ERROR, null, null, null, format, args); | |
58 } | |
59 | |
60 public void error(Element element, AnnotationMirror mirror, String format, Object... args) { | |
61 message(Kind.ERROR, element, mirror, null, format, args); | |
62 } | |
63 | |
64 public void error(Element element, AnnotationMirror mirror, AnnotationValue value, String format, Object... args) { | |
65 message(Kind.ERROR, element, mirror, value, format, args); | |
66 } | |
67 | |
68 public void message(Kind kind, Element element, AnnotationMirror mirror, AnnotationValue value, String format, Object... args) { | 44 public void message(Kind kind, Element element, AnnotationMirror mirror, AnnotationValue value, String format, Object... args) { |
69 AnnotationMirror usedMirror = mirror; | 45 AnnotationMirror usedMirror = mirror; |
70 Element usedElement = element; | 46 Element usedElement = element; |
71 AnnotationValue usedValue = value; | 47 AnnotationValue usedValue = value; |
72 String message = String.format(format, args); | 48 String message = String.format(format, args); |