Index: dart/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/TypeProviderImpl.java |
=================================================================== |
--- dart/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/TypeProviderImpl.java (revision 29808) |
+++ dart/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/TypeProviderImpl.java (working copy) |
@@ -1,11 +1,11 @@ |
/* |
* Copyright (c) 2013, the Dart project authors. |
- * |
+ * |
* Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except |
* in compliance with the License. You may obtain a copy of the License at |
- * |
+ * |
* http://www.eclipse.org/legal/epl-v10.html |
- * |
+ * |
* Unless required by applicable law or agreed to in writing, software distributed under the License |
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
* or implied. See the License for the specific language governing permissions and limitations under |
@@ -27,7 +27,7 @@ |
/** |
* Instances of the class {@code TypeProviderImpl} provide access to types defined by the language |
* by looking for those types in the element model for the core library. |
- * |
+ * |
* @coverage dart.engine.resolver |
*/ |
public class TypeProviderImpl implements TypeProvider { |
@@ -47,6 +47,11 @@ |
private InterfaceType doubleType; |
/** |
+ * The type representing the built-in type 'Deprecated'. |
+ */ |
+ private InterfaceType deprecatedType; |
+ |
+ /** |
* The type representing the built-in type 'dynamic'. |
*/ |
private Type dynamicType; |
@@ -108,7 +113,7 @@ |
/** |
* Initialize a newly created type provider to provide the types defined in the given library. |
- * |
+ * |
* @param coreLibrary the element representing the core library (dart:core). |
*/ |
public TypeProviderImpl(LibraryElement coreLibrary) { |
@@ -126,6 +131,11 @@ |
} |
@Override |
+ public InterfaceType getDeprecatedType() { |
+ return deprecatedType; |
+ } |
+ |
+ @Override |
public InterfaceType getDoubleType() { |
return doubleType; |
} |
@@ -193,7 +203,7 @@ |
/** |
* Return the type with the given name from the given namespace, or {@code null} if there is no |
* class with the given name. |
- * |
+ * |
* @param namespace the namespace in which to search for the given name |
* @param typeName the name of the type being searched for |
* @return the type that was found |
@@ -209,13 +219,14 @@ |
/** |
* Initialize the types provided by this type provider from the given library. |
- * |
+ * |
* @param library the library containing the definitions of the core types |
*/ |
private void initializeFrom(LibraryElement library) { |
Namespace namespace = new NamespaceBuilder().createPublicNamespace(library); |
boolType = getType(namespace, "bool"); |
bottomType = BottomTypeImpl.getInstance(); |
+ deprecatedType = getType(namespace, "Deprecated"); |
doubleType = getType(namespace, "double"); |
dynamicType = DynamicTypeImpl.getInstance(); |
functionType = getType(namespace, "Function"); |