Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/ast/CodeTypeElement.java @ 16757:0cd0bdedd4ad
Truffle-DSL: removed old writable AST API.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 11 Aug 2014 15:53:05 +0200 |
parents | 55fd5be68a52 |
children |
comparison
equal
deleted
inserted
replaced
16756:5148aab962af | 16757:0cd0bdedd4ad |
---|---|
109 | 109 |
110 public boolean isTopLevelClass() { | 110 public boolean isTopLevelClass() { |
111 return super.getEnclosingElement() instanceof CodeCompilationUnit; | 111 return super.getEnclosingElement() instanceof CodeCompilationUnit; |
112 } | 112 } |
113 | 113 |
114 public CodeVariableElement getField(String name) { | |
115 for (VariableElement field : ElementFilter.fieldsIn(getEnclosedElements())) { | |
116 if (field.getSimpleName().toString().equals(name)) { | |
117 return (CodeVariableElement) field; | |
118 } | |
119 } | |
120 return null; | |
121 } | |
122 | |
123 private Name createQualifiedName() { | 114 private Name createQualifiedName() { |
124 TypeElement enclosingType = getEnclosingClass(); | 115 TypeElement enclosingType = getEnclosingClass(); |
125 if (enclosingType == null) { | 116 if (enclosingType == null) { |
126 return CodeNames.of(packageName + "." + simpleName); | 117 return CodeNames.of(packageName + "." + simpleName); |
127 } else { | 118 } else { |