| OLD | NEW |
| 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.resolver; | 5 package com.google.dart.compiler.resolver; |
| 6 | 6 |
| 7 import com.google.dart.compiler.ast.DartExpression; | 7 import com.google.dart.compiler.ast.DartExpression; |
| 8 import com.google.dart.compiler.ast.DartNode; | 8 import com.google.dart.compiler.ast.DartNode; |
| 9 import com.google.dart.compiler.ast.Modifiers; | 9 import com.google.dart.compiler.ast.Modifiers; |
| 10 import com.google.dart.compiler.common.SourceInfo; | 10 import com.google.dart.compiler.common.SourceInfo; |
| 11 import com.google.dart.compiler.type.Type; | 11 import com.google.dart.compiler.type.Type; |
| 12 | 12 |
| 13 class VariableElementImplementation extends AbstractElement implements VariableE
lement { | 13 class VariableElementImplementation extends AbstractElement implements VariableE
lement { |
| 14 private final Element owner; | 14 private final EnclosingElement owner; |
| 15 private final ElementKind kind; | 15 private final ElementKind kind; |
| 16 private final Modifiers modifiers; | 16 private final Modifiers modifiers; |
| 17 private final boolean isNamed; | 17 private final boolean isNamed; |
| 18 private final DartExpression defaultValue; | 18 private final DartExpression defaultValue; |
| 19 private final SourceInfo nameLocation; | 19 private final SourceInfo nameLocation; |
| 20 | 20 |
| 21 // The field element is set for constructor parameters of the form | 21 // The field element is set for constructor parameters of the form |
| 22 // this.foo by the resolver. | 22 // this.foo by the resolver. |
| 23 private FieldElement fieldElement; | 23 private FieldElement fieldElement; |
| 24 private Type type; | 24 private Type type; |
| 25 | 25 |
| 26 VariableElementImplementation(Element owner, | 26 VariableElementImplementation(EnclosingElement owner, |
| 27 DartNode node, | 27 DartNode node, |
| 28 SourceInfo nameLocation, | 28 SourceInfo nameLocation, |
| 29 String name, | 29 String name, |
| 30 ElementKind kind, | 30 ElementKind kind, |
| 31 Modifiers modifiers, | 31 Modifiers modifiers, |
| 32 boolean isNamed, | 32 boolean isNamed, |
| 33 DartExpression defaultValue) { | 33 DartExpression defaultValue) { |
| 34 super(node, name); | 34 super(node, name); |
| 35 this.owner = owner; | 35 this.owner = owner; |
| 36 this.isNamed = isNamed; | 36 this.isNamed = isNamed; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 void setParameterInitializerElement(FieldElement element) { | 78 void setParameterInitializerElement(FieldElement element) { |
| 79 this.fieldElement = element; | 79 this.fieldElement = element; |
| 80 } | 80 } |
| 81 | 81 |
| 82 @Override | 82 @Override |
| 83 public FieldElement getParameterInitializerElement() { | 83 public FieldElement getParameterInitializerElement() { |
| 84 return fieldElement; | 84 return fieldElement; |
| 85 } | 85 } |
| 86 | 86 |
| 87 @Override | 87 @Override |
| 88 public Element getEnclosingElement() { | 88 public EnclosingElement getEnclosingElement() { |
| 89 return owner; | 89 return owner; |
| 90 } | 90 } |
| 91 } | 91 } |
| OLD | NEW |