Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/java/ElementUtils.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 |
comparison
equal
deleted
inserted
replaced
16764:f9fff060dc41 | 16765:89f635cbd85e |
---|---|
59 return false; | 59 return false; |
60 } else if (isAssignable(sourceType, targetType)) { | 60 } else if (isAssignable(sourceType, targetType)) { |
61 return false; | 61 return false; |
62 } | 62 } |
63 return true; | 63 return true; |
64 } | |
65 | |
66 public static String createReferenceName(ExecutableElement method) { | |
67 StringBuilder b = new StringBuilder(); | |
68 | |
69 b.append(method.getSimpleName().toString()); | |
70 b.append("("); | |
71 | |
72 String sep = ""; | |
73 for (VariableElement parameter : method.getParameters()) { | |
74 b.append(sep); | |
75 b.append(ElementUtils.getSimpleName(parameter.asType())); | |
76 sep = ", "; | |
77 } | |
78 | |
79 b.append(")"); | |
80 return b.toString(); | |
64 } | 81 } |
65 | 82 |
66 public static VariableElement findVariableElement(DeclaredType type, String name) { | 83 public static VariableElement findVariableElement(DeclaredType type, String name) { |
67 List<? extends VariableElement> elements = ElementFilter.fieldsIn(type.asElement().getEnclosedElements()); | 84 List<? extends VariableElement> elements = ElementFilter.fieldsIn(type.asElement().getEnclosedElements()); |
68 for (VariableElement variableElement : elements) { | 85 for (VariableElement variableElement : elements) { |