Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: compiler/java/com/google/dart/compiler/ast/DartMethodDefinition.java

Issue 9633009: Use Element instead of Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 package com.google.dart.compiler.ast; 5 package com.google.dart.compiler.ast;
6 6
7 import com.google.dart.compiler.common.Symbol; 7 import com.google.dart.compiler.resolver.Element;
8 import com.google.dart.compiler.resolver.MethodElement; 8 import com.google.dart.compiler.resolver.MethodElement;
9 9
10 import java.util.Collections; 10 import java.util.Collections;
11 import java.util.List; 11 import java.util.List;
12 12
13 /** 13 /**
14 * Represents a Dart method definition. 14 * Represents a Dart method definition.
15 */ 15 */
16 public class DartMethodDefinition extends DartClassMember<DartExpression> { 16 public class DartMethodDefinition extends DartClassMember<DartExpression> {
17 17
(...skipping 15 matching lines...) Expand all
33 private DartMethodDefinition(DartExpression name, DartFunction function, Modif iers modifiers) { 33 private DartMethodDefinition(DartExpression name, DartFunction function, Modif iers modifiers) {
34 super(name, modifiers); 34 super(name, modifiers);
35 this.function = becomeParentOf(function); 35 this.function = becomeParentOf(function);
36 } 36 }
37 37
38 public DartFunction getFunction() { 38 public DartFunction getFunction() {
39 return function; 39 return function;
40 } 40 }
41 41
42 @Override 42 @Override
43 public MethodElement getSymbol() { 43 public MethodElement getElement() {
44 return element; 44 return element;
45 } 45 }
46 46
47 @Override 47 @Override
48 public void setSymbol(Symbol symbol) { 48 public void setElement(Element element) {
49 element = (MethodElement) symbol; 49 this.element = (MethodElement) element;
50 } 50 }
51 51
52 public List<DartInitializer> getInitializers() { 52 public List<DartInitializer> getInitializers() {
53 return Collections.emptyList(); 53 return Collections.emptyList();
54 } 54 }
55 55
56 @Override 56 @Override
57 public void visitChildren(ASTVisitor<?> visitor) { 57 public void visitChildren(ASTVisitor<?> visitor) {
58 super.visitChildren(visitor); 58 super.visitChildren(visitor);
59 function.accept(visitor); 59 function.accept(visitor);
(...skipping 21 matching lines...) Expand all
81 return initializers; 81 return initializers;
82 } 82 }
83 83
84 @Override 84 @Override
85 public void visitChildren(ASTVisitor<?> visitor) { 85 public void visitChildren(ASTVisitor<?> visitor) {
86 super.visitChildren(visitor); 86 super.visitChildren(visitor);
87 initializers.accept(visitor); 87 initializers.accept(visitor);
88 } 88 }
89 } 89 }
90 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698