Mercurial > hg > truffle
comparison graal/com.oracle.graal.nodeinfo.processor/src/com/oracle/graal/nodeinfo/processor/GraphNodeProcessor.java @ 19396:7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 16 Feb 2015 15:43:03 +0100 |
parents | ec0733b5a90a |
children | 4514065de564 |
comparison
equal
deleted
inserted
replaced
19395:a306749d3e86 | 19396:7e2c87dae93e |
---|---|
131 // TODO(thomaswue): Reenable this check. | 131 // TODO(thomaswue): Reenable this check. |
132 // errorMessage(element, "%s annotated class must be either final or abstract", | 132 // errorMessage(element, "%s annotated class must be either final or abstract", |
133 // NodeInfo.class.getSimpleName()); | 133 // NodeInfo.class.getSimpleName()); |
134 // continue; | 134 // continue; |
135 } | 135 } |
136 boolean found = false; | |
137 for (Element e : typeElement.getEnclosedElements()) { | |
138 if (e.getKind() == ElementKind.FIELD) { | |
139 if (e.getSimpleName().toString().equals("TYPE")) { | |
140 found = true; | |
141 break; | |
142 } | |
143 } | |
144 } | |
145 if (!found) { | |
146 errorMessage(element, "%s annotated class must have a field named TYPE", NodeInfo.class.getSimpleName()); | |
147 } | |
136 | 148 |
137 if (!typeElement.equals(verifier.Node) && !modifiers.contains(Modifier.ABSTRACT)) { | 149 if (!typeElement.equals(verifier.Node) && !modifiers.contains(Modifier.ABSTRACT)) { |
138 verifier.verify(typeElement); | 150 verifier.verify(typeElement); |
139 } | 151 } |
140 } catch (ElementException ee) { | 152 } catch (ElementException ee) { |