comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/TemplateMethod.java @ 7502:6343a09b2ec1

Codegen operation generation is inferred from the node type hierarchy.
author Christian Humer <christian.humer@gmail.com>
date Fri, 18 Jan 2013 13:28:12 +0100
parents a748e4d44694
children 06a7cd6aaf00
comparison
equal deleted inserted replaced
7497:0f8c6dbf68be 7502:6343a09b2ec1
24 24
25 import javax.lang.model.element.*; 25 import javax.lang.model.element.*;
26 26
27 public class TemplateMethod { 27 public class TemplateMethod {
28 28
29 private final Template template;
29 private final MethodSpec specification; 30 private final MethodSpec specification;
30 private final ExecutableElement method; 31 private final ExecutableElement method;
31 private final AnnotationMirror markerAnnotation; 32 private final AnnotationMirror markerAnnotation;
32 private final ActualParameter returnType; 33 private final ActualParameter returnType;
33 private final ActualParameter[] parameters; 34 private final ActualParameter[] parameters;
34 35
35 public TemplateMethod(MethodSpec specification, ExecutableElement method, AnnotationMirror markerAnnotation, ActualParameter returnType, ActualParameter[] parameters) { 36 public TemplateMethod(Template template, MethodSpec specification, ExecutableElement method, AnnotationMirror markerAnnotation, ActualParameter returnType, ActualParameter[] parameters) {
37 this.template = template;
36 this.specification = specification; 38 this.specification = specification;
37 this.method = method; 39 this.method = method;
38 this.markerAnnotation = markerAnnotation; 40 this.markerAnnotation = markerAnnotation;
39 this.returnType = returnType; 41 this.returnType = returnType;
40 this.parameters = parameters; 42 this.parameters = parameters;
41 } 43 }
42 44
43 public TemplateMethod(TemplateMethod method) { 45 public TemplateMethod(TemplateMethod method) {
46 this.template = method.template;
44 this.specification = method.specification; 47 this.specification = method.specification;
45 this.method = method.method; 48 this.method = method.method;
46 this.markerAnnotation = method.markerAnnotation; 49 this.markerAnnotation = method.markerAnnotation;
47 this.returnType = method.returnType; 50 this.returnType = method.returnType;
48 this.parameters = method.parameters; 51 this.parameters = method.parameters;
49 } 52 }
50 53
54 public Template getTemplate() {
55 return template;
56 }
51 57
52 public MethodSpec getSpecification() { 58 public MethodSpec getSpecification() {
53 return specification; 59 return specification;
54 } 60 }
55 61