OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library analyzer.error.error; | 5 library analyzer.error.error; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
10 import 'package:analyzer/error/listener.dart'; | 10 import 'package:analyzer/error/listener.dart'; |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 const ErrorProperty<List<FieldElement>>('NOT_INITIALIZED_FIELDS', 0); | 865 const ErrorProperty<List<FieldElement>>('NOT_INITIALIZED_FIELDS', 0); |
866 | 866 |
867 /** | 867 /** |
868 * A property whose value is the name of the library that is used by all | 868 * A property whose value is the name of the library that is used by all |
869 * of the "part of" directives, so should be used in the "library" directive. | 869 * of the "part of" directives, so should be used in the "library" directive. |
870 * Is `null` if there is no a single name used by all of the parts. | 870 * Is `null` if there is no a single name used by all of the parts. |
871 */ | 871 */ |
872 static const ErrorProperty<String> PARTS_LIBRARY_NAME = | 872 static const ErrorProperty<String> PARTS_LIBRARY_NAME = |
873 const ErrorProperty<String>('PARTS_LIBRARY_NAME', 1); | 873 const ErrorProperty<String>('PARTS_LIBRARY_NAME', 1); |
874 | 874 |
875 /** | |
876 * A property whose value is a list of [ExecutableElement] that should | |
877 * be but are not implemented by a concrete class. | |
878 */ | |
879 static const ErrorProperty<List<ExecutableElement>> UNIMPLEMENTED_METHODS = | |
880 const ErrorProperty<List<ExecutableElement>>('UNIMPLEMENTED_METHODS', 2); | |
881 | |
882 static const List<ErrorProperty> values = const [ | 875 static const List<ErrorProperty> values = const [ |
883 NOT_INITIALIZED_FIELDS, | 876 NOT_INITIALIZED_FIELDS, |
884 PARTS_LIBRARY_NAME, | 877 PARTS_LIBRARY_NAME, |
885 UNIMPLEMENTED_METHODS | |
886 ]; | 878 ]; |
887 | 879 |
888 /** | 880 /** |
889 * The name of this property. | 881 * The name of this property. |
890 */ | 882 */ |
891 final String name; | 883 final String name; |
892 | 884 |
893 /** | 885 /** |
894 * The ordinal value of the property. | 886 * The ordinal value of the property. |
895 */ | 887 */ |
896 final int ordinal; | 888 final int ordinal; |
897 | 889 |
898 const ErrorProperty(this.name, this.ordinal); | 890 const ErrorProperty(this.name, this.ordinal); |
899 | 891 |
900 @override | 892 @override |
901 int get hashCode => ordinal; | 893 int get hashCode => ordinal; |
902 | 894 |
903 @override | 895 @override |
904 int compareTo(ErrorProperty other) => ordinal - other.ordinal; | 896 int compareTo(ErrorProperty other) => ordinal - other.ordinal; |
905 | 897 |
906 @override | 898 @override |
907 String toString() => name; | 899 String toString() => name; |
908 } | 900 } |
OLD | NEW |