comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/TemplateMethodParser.java @ 7530:5e3d1a68664e

applied mx eclipseformat to all Java files
author Doug Simon <doug.simon@oracle.com>
date Wed, 23 Jan 2013 16:34:57 +0100
parents 6343a09b2ec1
children 5f3cba05c2fa
comparison
equal deleted inserted replaced
7529:4a11124a3563 7530:5e3d1a68664e
136 context.getLog().error(method, annotation, message); 136 context.getLog().error(method, annotation, message);
137 } 137 }
138 return null; 138 return null;
139 } 139 }
140 140
141 Iterator< ? extends VariableElement> variableIterator = method.getParameters().iterator(); 141 Iterator<? extends VariableElement> variableIterator = method.getParameters().iterator();
142 Iterator< ? extends ParameterSpec> specificationIterator = parameterSpecs.iterator(); 142 Iterator<? extends ParameterSpec> specificationIterator = parameterSpecs.iterator();
143 143
144 List<ActualParameter> resolvedMirrors = new ArrayList<>(); 144 List<ActualParameter> resolvedMirrors = new ArrayList<>();
145 VariableElement parameter = null; 145 VariableElement parameter = null;
146 ParameterSpec specification = null; 146 ParameterSpec specification = null;
147 while (specificationIterator.hasNext() || specification != null) { 147 while (specificationIterator.hasNext() || specification != null) {
229 return null; 229 return null;
230 } 230 }
231 return new ActualParameter(specification, resolvedType); 231 return new ActualParameter(specification, resolvedType);
232 } 232 }
233 233
234 public static String createExpectedSignature(String methodName, ParameterSpec returnType, List< ? extends ParameterSpec> parameters) { 234 public static String createExpectedSignature(String methodName, ParameterSpec returnType, List<? extends ParameterSpec> parameters) {
235 StringBuilder b = new StringBuilder(); 235 StringBuilder b = new StringBuilder();
236 236
237 b.append(" "); 237 b.append(" ");
238 b.append(createTypeSignature(returnType, true)); 238 b.append(createTypeSignature(returnType, true));
239 239
268 268
269 b.append(")"); 269 b.append(")");
270 270
271 TypeMirror[] types = null; 271 TypeMirror[] types = null;
272 272
273 //TODO allowed types may differ so different <Any> must be generated. 273 // TODO allowed types may differ so different <Any> must be generated.
274 if (returnType.getAllowedTypes().length > 1) { 274 if (returnType.getAllowedTypes().length > 1) {
275 types = returnType.getAllowedTypes(); 275 types = returnType.getAllowedTypes();
276 } 276 }
277 for (ParameterSpec param : parameters) { 277 for (ParameterSpec param : parameters) {
278 if (param.getAllowedTypes().length > 1) { 278 if (param.getAllowedTypes().length > 1) {
306 builder.append(spec.getName()); 306 builder.append(spec.getName());
307 } 307 }
308 return builder.toString(); 308 return builder.toString();
309 } 309 }
310 310
311
312 } 311 }