Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/ast/CodeExecutableElement.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 | 2b9fcffd6f36 |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/ast/CodeExecutableElement.java Mon Aug 11 15:53:05 2014 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/ast/CodeExecutableElement.java Mon Aug 11 15:53:05 2014 +0200 @@ -29,9 +29,8 @@ import javax.lang.model.type.*; import com.oracle.truffle.dsl.processor.*; -import com.oracle.truffle.dsl.processor.api.element.*; -public class CodeExecutableElement extends CodeElement<Element> implements WritableExecutableElement { +public class CodeExecutableElement extends CodeElement<Element> implements ExecutableElement { private final List<TypeMirror> throwables = new ArrayList<>(); private final List<VariableElement> parameters = parentableList(this, new ArrayList<VariableElement>()); @@ -88,7 +87,6 @@ return Collections.emptyList(); } - @Override public void setVarArgs(boolean varargs) { this.varArgs = varargs; } @@ -98,7 +96,6 @@ return varArgs; } - @Override public void setDefaultValue(AnnotationValue defaultValue) { this.defaultValue = defaultValue; } @@ -151,55 +148,34 @@ return types; } - @Override public void setReturnType(TypeMirror type) { returnType = type; } - @Override public void addParameter(VariableElement parameter) { parameters.add(parameter); } - @Override public void removeParameter(VariableElement parameter) { parameters.remove(parameter); } - public void removeParameter(String varName) { - VariableElement remove = null; - for (VariableElement var : getParameters()) { - if (var.getSimpleName().toString().equals(varName)) { - remove = var; - break; - } - } - if (remove != null) { - parameters.remove(remove); - } - } - - @Override public void addThrownType(TypeMirror thrownType) { throwables.add(thrownType); } - @Override public void removeThrownType(TypeMirror thrownType) { throwables.remove(thrownType); } - @Override public void setSimpleName(Name name) { this.name = name; } - @Override public void setBody(String body) { this.body = body; } - @Override public String getBody() { return body; }