Mercurial > hg > truffle
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/NodeGenFactory.java @ 18774:674c8a6d5e6c
Truffle-DSL: fixed wrong visibility of DSL nodes generated by the new layout.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 05 Jan 2015 01:31:07 +0100 |
parents | 15fe16c45d64 |
children | c0fb70634640 |
comparison
equal
deleted
inserted
replaced
18773:7382bbcac3a3 | 18774:674c8a6d5e6c |
---|---|
123 private static String assumptionName(String assumption) { | 123 private static String assumptionName(String assumption) { |
124 return assumption + "_"; | 124 return assumption + "_"; |
125 } | 125 } |
126 | 126 |
127 public CodeTypeElement create() { | 127 public CodeTypeElement create() { |
128 String typeName = nodeTypeName(node); | 128 CodeTypeElement clazz = GeneratorUtils.createClass(node, null, modifiers(FINAL), nodeTypeName(node), node.getTemplateType().asType()); |
129 TypeMirror baseType = node.getTemplateType().asType(); | 129 ElementUtils.setVisibility(clazz.getModifiers(), ElementUtils.getVisibility(node.getTemplateType().getModifiers())); |
130 CodeTypeElement clazz = GeneratorUtils.createClass(node, null, modifiers(PUBLIC, FINAL), typeName, baseType); | |
131 | |
132 clazz.getImplements().add(getType(SpecializedNode.class)); | 130 clazz.getImplements().add(getType(SpecializedNode.class)); |
133 | 131 |
134 for (String assumption : node.getAssumptions()) { | 132 for (String assumption : node.getAssumptions()) { |
135 clazz.add(new CodeVariableElement(modifiers(PRIVATE, FINAL), getType(Assumption.class), assumptionName(assumption))); | 133 clazz.add(new CodeVariableElement(modifiers(PRIVATE, FINAL), getType(Assumption.class), assumptionName(assumption))); |
136 } | 134 } |