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

Unified Diff: dart/compiler/java/com/google/dart/compiler/resolver/TypeVariableElementImplementation.java

Issue 20722006: Removed compiler/ directory from repository (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: dart/compiler/java/com/google/dart/compiler/resolver/TypeVariableElementImplementation.java
diff --git a/dart/compiler/java/com/google/dart/compiler/resolver/TypeVariableElementImplementation.java b/dart/compiler/java/com/google/dart/compiler/resolver/TypeVariableElementImplementation.java
deleted file mode 100644
index 62c1a010bf72a43ecdb45a31b5703d8e1dd800fb..0000000000000000000000000000000000000000
--- a/dart/compiler/java/com/google/dart/compiler/resolver/TypeVariableElementImplementation.java
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.resolver;
-
-import com.google.dart.compiler.ast.DartTypeNode;
-import com.google.dart.compiler.ast.DartTypeParameter;
-import com.google.dart.compiler.type.Type;
-import com.google.dart.compiler.type.TypeVariable;
-import com.google.dart.compiler.type.Types;
-
-/**
- * Representation of a type variable.
- *
- * <p>
- * For example, in {@code class Foo<T> ... } , {@code T} is a type variable.
- */
-class TypeVariableElementImplementation extends AbstractNodeElement implements TypeVariableNodeElement {
-
- private final EnclosingElement owner;
- private TypeVariable type;
- private Type bound;
- private final DartTypeNode boundNode;
-
- TypeVariableElementImplementation(String name, Type bound) {
- this(null, name, null);
- this.bound = bound;
- }
-
- TypeVariableElementImplementation(DartTypeParameter node, String name, EnclosingElement owner) {
- super(node, name);
- this.owner = owner;
- this.boundNode = node != null ? node.getBound() : null;
- }
-
- @Override
- public TypeVariable getType() {
- return type;
- }
-
- @Override
- public ElementKind getKind() {
- return ElementKind.TYPE_VARIABLE;
- }
-
- static TypeVariableElementImplementation fromNode(DartTypeParameter node, EnclosingElement owner) {
- TypeVariableElementImplementation element =
- new TypeVariableElementImplementation(node, node.getName().getName(), owner);
- element.setType(Types.typeVariable(element));
- return element;
- }
-
- @Override
- public TypeVariable getTypeVariable() {
- return getType();
- }
-
- @Override
- void setType(Type type) {
- this.type = (TypeVariable) type;
- }
-
- @Override
- public Type getBound() {
- if (boundNode != null) {
- return boundNode.getType();
- }
- // no explicit bound, try to get Object
- if (bound == null) {
- if (owner instanceof ClassElement) {
- Scope libraryScope = ((ClassElement) owner).getLibrary().getScope();
- bound = libraryScope.findElement(null, "Object").getType();
- }
- }
- return bound;
- }
-
- @Override
- public Element getDeclaringElement() {
- return owner;
- }
-
- @Override
- public EnclosingElement getEnclosingElement() {
- return owner;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698