| Index: compiler/java/com/google/dart/compiler/type/InterfaceTypeUnionImplementation.java
|
| diff --git a/compiler/java/com/google/dart/compiler/type/InterfaceTypeUnion.java b/compiler/java/com/google/dart/compiler/type/InterfaceTypeUnionImplementation.java
|
| similarity index 80%
|
| copy from compiler/java/com/google/dart/compiler/type/InterfaceTypeUnion.java
|
| copy to compiler/java/com/google/dart/compiler/type/InterfaceTypeUnionImplementation.java
|
| index c3eca3b606ca9b66909949ff3670f4ad4321ae7a..b17a4d3a5173614f652cace73df87b04e27e7a53 100644
|
| --- a/compiler/java/com/google/dart/compiler/type/InterfaceTypeUnion.java
|
| +++ b/compiler/java/com/google/dart/compiler/type/InterfaceTypeUnionImplementation.java
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// 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.
|
|
|
| @@ -11,22 +11,22 @@ import com.google.dart.compiler.resolver.ClassElementUnion;
|
| import java.util.List;
|
|
|
| /**
|
| - * Artificial {@link InterfaceType} which is union of several {@link InterfaceType}s.
|
| + * Implementation of {@link InterfaceTypeUnion}.
|
| */
|
| -class InterfaceTypeUnion implements InterfaceType {
|
| -
|
| +class InterfaceTypeUnionImplementation implements InterfaceTypeUnion {
|
| +
|
| private final List<InterfaceType> types;
|
| private final ClassElement element;
|
|
|
| - public InterfaceTypeUnion(List<InterfaceType> types) {
|
| + public InterfaceTypeUnionImplementation(List<InterfaceType> types) {
|
| this.types = types;
|
| this.element = new ClassElementUnion(this, types);
|
| }
|
| -
|
| +
|
| @Override
|
| public boolean equals(Object obj) {
|
| - if (obj instanceof InterfaceTypeUnion) {
|
| - InterfaceTypeUnion other = (InterfaceTypeUnion) obj;
|
| + if (obj instanceof InterfaceTypeUnionImplementation) {
|
| + InterfaceTypeUnionImplementation other = (InterfaceTypeUnionImplementation) obj;
|
| return getElement().equals(other.getElement());
|
| }
|
| return false;
|
| @@ -44,7 +44,7 @@ class InterfaceTypeUnion implements InterfaceType {
|
| public String toString() {
|
| return types.toString();
|
| }
|
| -
|
| +
|
| @Override
|
| public TypeKind getKind() {
|
| return TypeKind.INTERFACE;
|
| @@ -95,17 +95,21 @@ class InterfaceTypeUnion implements InterfaceType {
|
| }
|
| return null;
|
| }
|
| -
|
| +
|
| @Override
|
| public void registerSubClass(ClassElement subClass) {
|
| }
|
| -
|
| +
|
| @Override
|
| public void unregisterSubClass(ClassElement subClass) {
|
| }
|
| -
|
| +
|
| @Override
|
| public Member lookupSubTypeMember(String name) {
|
| return null;
|
| }
|
| +
|
| + public List<InterfaceType> getTypes() {
|
| + return types;
|
| + }
|
| }
|
|
|