| 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.common.annotations.VisibleForTesting; | 7 import com.google.common.annotations.VisibleForTesting; |
| 8 import com.google.dart.compiler.ast.DartClass; | 8 import com.google.dart.compiler.ast.DartClass; |
| 9 import com.google.dart.compiler.ast.DartField; | 9 import com.google.dart.compiler.ast.DartField; |
| 10 import com.google.dart.compiler.ast.DartFunctionExpression; | 10 import com.google.dart.compiler.ast.DartFunctionExpression; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 176 } |
| 177 | 177 |
| 178 public static MethodElement lookupLocalMethod(ClassElement cls, String name) { | 178 public static MethodElement lookupLocalMethod(ClassElement cls, String name) { |
| 179 return ((ClassElementImplementation) cls).lookupLocalMethod(name); | 179 return ((ClassElementImplementation) cls).lookupLocalMethod(name); |
| 180 } | 180 } |
| 181 | 181 |
| 182 public static FieldElement lookupLocalField(ClassElement cls, String name) { | 182 public static FieldElement lookupLocalField(ClassElement cls, String name) { |
| 183 return ((ClassElementImplementation) cls).lookupLocalField(name); | 183 return ((ClassElementImplementation) cls).lookupLocalField(name); |
| 184 } | 184 } |
| 185 | 185 |
| 186 public static FieldElement lookupField(ClassElement cls, String name) { |
| 187 return ((ClassElementImplementation) cls).lookupField(name); |
| 188 } |
| 189 |
| 186 static ConstructorElement constructorNamed(String name, ClassElement declaring
Class, | 190 static ConstructorElement constructorNamed(String name, ClassElement declaring
Class, |
| 187 ClassElement constructorType) { | 191 ClassElement constructorType) { |
| 188 return ConstructorElementImplementation.named(name, declaringClass, construc
torType); | 192 return ConstructorElementImplementation.named(name, declaringClass, construc
torType); |
| 189 } | 193 } |
| 190 | 194 |
| 191 public static FunctionAliasElement functionTypeAliasFromNode(DartFunctionTypeA
lias node, | 195 public static FunctionAliasElement functionTypeAliasFromNode(DartFunctionTypeA
lias node, |
| 192 LibraryElement li
brary) { | 196 LibraryElement li
brary) { |
| 193 return FunctionAliasElementImplementation.fromNode(node, library); | 197 return FunctionAliasElementImplementation.fromNode(node, library); |
| 194 } | 198 } |
| 195 | 199 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 220 return VoidElement.getInstance(); | 224 return VoidElement.getInstance(); |
| 221 } | 225 } |
| 222 | 226 |
| 223 /** | 227 /** |
| 224 * Returns true if the class needs an implicit default constructor. | 228 * Returns true if the class needs an implicit default constructor. |
| 225 */ | 229 */ |
| 226 public static boolean needsImplicitDefaultConstructor(ClassElement classElemen
t) { | 230 public static boolean needsImplicitDefaultConstructor(ClassElement classElemen
t) { |
| 227 return !classElement.isObject() && classElement.getConstructors().isEmpty(); | 231 return !classElement.isObject() && classElement.getConstructors().isEmpty(); |
| 228 } | 232 } |
| 229 } | 233 } |
| OLD | NEW |