comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/typesystem/TypeSystemMethodParser.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 0905d796944a
comparison
equal deleted inserted replaced
7529:4a11124a3563 7530:5e3d1a68664e
26 26
27 import com.oracle.truffle.api.codegen.*; 27 import com.oracle.truffle.api.codegen.*;
28 import com.oracle.truffle.codegen.processor.*; 28 import com.oracle.truffle.codegen.processor.*;
29 import com.oracle.truffle.codegen.processor.template.*; 29 import com.oracle.truffle.codegen.processor.template.*;
30 30
31
32 abstract class TypeSystemMethodParser<E extends TemplateMethod> extends TemplateMethodParser<TypeSystemData, E> { 31 abstract class TypeSystemMethodParser<E extends TemplateMethod> extends TemplateMethodParser<TypeSystemData, E> {
33 32
34 public TypeSystemMethodParser(ProcessorContext context, TypeSystemData typeSystem) { 33 public TypeSystemMethodParser(ProcessorContext context, TypeSystemData typeSystem) {
35 super(context, typeSystem); 34 super(context, typeSystem);
36 } 35 }
46 45
47 protected TypeData findTypeByMethodName(ExecutableElement method, AnnotationMirror annotationMirror, String prefix) { 46 protected TypeData findTypeByMethodName(ExecutableElement method, AnnotationMirror annotationMirror, String prefix) {
48 String methodName = method.getSimpleName().toString(); 47 String methodName = method.getSimpleName().toString();
49 if (!methodName.startsWith(prefix)) { 48 if (!methodName.startsWith(prefix)) {
50 String annotationName = Utils.getSimpleName(annotationMirror.getAnnotationType()); 49 String annotationName = Utils.getSimpleName(annotationMirror.getAnnotationType());
51 getContext().getLog().error(method, "Methods annotated with %s must match the pattern '%s'.", 50 getContext().getLog().error(method, "Methods annotated with %s must match the pattern '%s'.", annotationName, String.format("%s${typeName}", prefix));
52 annotationName, String.format("%s${typeName}", prefix));
53 return null; 51 return null;
54 } 52 }
55 String typeName = methodName.substring(prefix.length(), methodName.length()); 53 String typeName = methodName.substring(prefix.length(), methodName.length());
56 TypeData type = getTypeSystem().findType(typeName); 54 TypeData type = getTypeSystem().findType(typeName);
57 if (type == null) { 55 if (type == null) {