Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/AbstractParser.java @ 16765:89f635cbd85e
Truffle-DSL: fixed assertions on unspecified toString methods of the annotation processing API.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 11 Aug 2014 17:20:24 +0200 |
parents | 23415229349b |
children | 45c8f64978d6 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/AbstractParser.java Mon Aug 11 16:37:40 2014 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/AbstractParser.java Mon Aug 11 17:20:24 2014 +0200 @@ -106,10 +106,14 @@ private static String wrapText(Element element, AnnotationMirror mirror, String text) { StringBuilder b = new StringBuilder(); if (element != null) { - b.append("Element " + element.toString()); + if (element.getKind() == ElementKind.METHOD) { + b.append("Method " + ElementUtils.createReferenceName((ExecutableElement) element)); + } else { + b.append("Element " + element.getSimpleName()); + } } if (mirror != null) { - b.append(" at annotation @" + ElementUtils.getSimpleName(mirror.getAnnotationType())); + b.append(" at annotation @" + ElementUtils.getSimpleName(mirror.getAnnotationType()).trim()); } if (b.length() > 0) {