| Index: editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
|
| diff --git a/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart b/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
|
| index 2eb5f7fe7986e21886ff00236620055989f69b70..4c47b62ff9b87da60c6f2e52eec9bf6a7b7e9f31 100644
|
| --- a/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
|
| +++ b/editor/util/plugins/com.google.dart.java2dart/resources/java_core.dart
|
| @@ -23,79 +23,6 @@ class JavaSystem {
|
| }
|
| }
|
|
|
| -Stopwatch instanceOfTimer = new Stopwatch();
|
| -
|
| -/**
|
| - * Limited implementation of "o is instanceOfType", see
|
| - * http://code.google.com/p/dart/issues/detail?id=8184
|
| - */
|
| -bool isInstanceOf(o, Type t) {
|
| - instanceOfTimer.start();
|
| - try {
|
| - if (o == null) {
|
| - return false;
|
| - }
|
| - if (o.runtimeType == t) {
|
| - return true;
|
| - }
|
| - String oTypeName = o.runtimeType.toString();
|
| - String tTypeName = t.toString();
|
| - if (oTypeName == tTypeName) {
|
| - return true;
|
| - }
|
| - if (oTypeName.startsWith("List") && tTypeName == "List") {
|
| - return true;
|
| - }
|
| - if (tTypeName == "Map" && o is Map) {
|
| - return true;
|
| - }
|
| - // Dart Analysis Engine specific
|
| - if (oTypeName == "${tTypeName}Impl") {
|
| - return true;
|
| - }
|
| - if (tTypeName == "FormalParameter") {
|
| - return
|
| - oTypeName == "DefaultFormalParameter" ||
|
| - oTypeName == "FieldNormalParameter" ||
|
| - oTypeName == "FunctionTypedFormalParameter" ||
|
| - oTypeName == "SimpleFormalParameter";
|
| - }
|
| - if (tTypeName == "MethodElement") {
|
| - if (oTypeName == "MethodMember") {
|
| - return true;
|
| - }
|
| - }
|
| - if (tTypeName == "ExecutableElement") {
|
| - if (oTypeName == "MethodElementImpl" ||
|
| - oTypeName == "FunctionElementImpl" ||
|
| - oTypeName == "PropertyAccessorElementImpl") {
|
| - return true;
|
| - }
|
| - }
|
| - if (tTypeName == "ParameterElement") {
|
| - if (oTypeName == "FieldFormalParameterElementImpl" ||
|
| - oTypeName == "DefaultFieldFormalParameterElementImpl" ||
|
| - oTypeName == "DefaultParameterElementImpl") {
|
| - return true;
|
| - }
|
| - }
|
| - if (tTypeName == "VariableElement") {
|
| - if (oTypeName == "LocalVariableElementImpl" ||
|
| - oTypeName == "ConstLocalVariableElementImpl" ||
|
| - oTypeName == "FieldElementImpl" ||
|
| - oTypeName == "ConstFieldElementImpl" ||
|
| - oTypeName == "TopLevelVariableElementImpl" ||
|
| - oTypeName == "ConstTopLevelVariableElementImpl") {
|
| - return true;
|
| - }
|
| - }
|
| - // no
|
| - return false;
|
| - } finally {
|
| - instanceOfTimer.stop();
|
| - }
|
| -}
|
| -
|
| class JavaArrays {
|
| static bool equals(List a, List b) {
|
| if (identical(a, b)) {
|
|
|