Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/java/ElementUtils.java @ 19282:ae81dd154fb6
Truffle-DSL: remove old DSL layout; Make new layout the default.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 22 Jan 2015 20:44:24 +0100 |
parents | 121748e43a01 |
children | 08aa0372dad4 |
comparison
equal
deleted
inserted
replaced
19281:92880b0f7fed | 19282:ae81dd154fb6 |
---|---|
115 sep = ", "; | 115 sep = ", "; |
116 } | 116 } |
117 | 117 |
118 b.append(")"); | 118 b.append(")"); |
119 return b.toString(); | 119 return b.toString(); |
120 } | |
121 | |
122 public static VariableElement findVariableElement(DeclaredType type, String name) { | |
123 List<? extends VariableElement> elements = ElementFilter.fieldsIn(type.asElement().getEnclosedElements()); | |
124 for (VariableElement variableElement : elements) { | |
125 if (variableElement.getSimpleName().toString().equals(name)) { | |
126 return variableElement; | |
127 } | |
128 } | |
129 return null; | |
130 } | 120 } |
131 | 121 |
132 public static TypeMirror boxType(ProcessorContext context, TypeMirror primitiveType) { | 122 public static TypeMirror boxType(ProcessorContext context, TypeMirror primitiveType) { |
133 TypeMirror boxedType = primitiveType; | 123 TypeMirror boxedType = primitiveType; |
134 if (boxedType.getKind().isPrimitive()) { | 124 if (boxedType.getKind().isPrimitive()) { |