@@ -480,16 +480,18 @@ abstract class InstanceMirror implements ObjectMirror {
480
480
ClassMirror get type;
481
481
482
482
/**
483
- * Does [reflectee] contain the instance reflected by this mirror?
484
- * This will always be true in the local case (reflecting instances
485
- * in the same isolate), but only true in the remote case if this
486
- * mirror reflects a simple value.
483
+ * Whether [reflectee] will return the instance reflected by this mirror.
484
+ *
485
+ * This will always be true in the local case (reflecting instances in the
486
+ * same isolate), but only true in the remote case if this mirror reflects a
487
+ * simple value.
487
488
*
488
489
* A value is simple if one of the following holds:
489
- * - the value is [:null:]
490
- * - the value is of type [num]
491
- * - the value is of type [bool]
492
- * - the value is of type [String]
490
+ *
491
+ * * the value is [:null:]
492
+ * * the value is of type [num]
493
+ * * the value is of type [bool]
494
+ * * the value is of type [String]
493
495
*/
494
496
bool get hasReflectee;
495
497
@@ -504,16 +506,18 @@ abstract class InstanceMirror implements ObjectMirror {
504
506
get reflectee;
505
507
506
508
/**
507
- * Returns true if this mirror is equal to [other] .
509
+ * Whether this mirror is equal to [other] .
510
+ *
508
511
* The equality holds if and only if
509
- * (1) [other] is a mirror of the same kind
510
- * and
511
- * (2) either
512
- * (a) [hasReflectee] is true and so is
513
- * [:identical(reflectee, other.reflectee):]
514
- * or
515
- * (b) the remote objects reflected by this mirror and
516
- * by [other] are identical.
512
+ *
513
+ * 1. [other] is a mirror of the same kind, and
514
+ * 2. either
515
+ *
516
+ * a. [hasReflectee] is true and so is
517
+ * [:identical(reflectee, other.reflectee):], or
518
+ *
519
+ * b. the remote objects reflected by this mirror and by [other] are
520
+ * identical.
517
521
*/
518
522
bool operator == (other);
519
523
}
@@ -548,20 +552,24 @@ abstract class ClosureMirror implements InstanceMirror {
548
552
549
553
/**
550
554
* Executes the closure and returns a mirror on the result.
555
+ *
551
556
* Let *f* be the closure reflected by this mirror,
552
- * let *a1, ..., an* be the elements of [positionalArguments]
557
+ * let *a1, ..., an* be the elements of [positionalArguments] ,
553
558
* let *k1, ..., km* be the identifiers denoted by the elements of
554
- * [namedArguments.keys]
559
+ * [namedArguments.keys] ,
555
560
* and let *v1, ..., vm* be the elements of [namedArguments.values] .
561
+ *
556
562
* Then this method will perform the method invocation
557
- * *f(a1, ..., an, k1: v1, ..., km: vm)*
558
- * If the invocation returns a result *r*, this method returns
559
- * the result of calling [reflect] \(*r*\).
560
- * If the invocation causes a compilation error
561
- * the effect is the same as if a non-reflective compilation error
562
- * had been encountered.
563
- * If the invocation throws an exception *e* (that it does not catch)
564
- * this method throws *e*.
563
+ * *f(a1, ..., an, k1: v1, ..., km: vm)*.
564
+ *
565
+ * If the invocation returns a result *r*, this method returns the result of
566
+ * calling [reflect] \(*r*\).
567
+ *
568
+ * If the invocation causes a compilation error, the effect is the same as if
569
+ * a non-reflective compilation error had been encountered.
570
+ *
571
+ * If the invocation throws an exception *e* (that it does not catch), this
572
+ * method throws *e*.
565
573
*/
566
574
InstanceMirror apply (List positionalArguments,
567
575
[Map <Symbol , dynamic > namedArguments]);
@@ -588,18 +596,15 @@ abstract class LibraryMirror implements DeclarationMirror, ObjectMirror {
588
596
Map <Symbol , DeclarationMirror > get declarations;
589
597
590
598
/**
591
- * Returns [:true:] if this mirror is equal to [other] .
592
- * Otherwise returns [:false:] .
599
+ * Whether this mirror is equal to [other] .
593
600
*
594
601
* The equality holds if and only if
595
- * (1) [other] is a mirror of the same kind
596
- * and
597
- * (2) The library being reflected by this mirror
598
- * and the library being reflected by [other]
599
- * are
600
- * the same library in the same isolate.
602
+ *
603
+ * 1. [other] is a mirror of the same kind, and
604
+ * 2. The library being reflected by this mirror and the library being
605
+ * reflected by [other] are the same library in the same isolate.
601
606
*/
602
- bool operator == (other);
607
+ bool operator == (other);
603
608
604
609
/**
605
610
* Returns a list of the imports and exports in this library;
@@ -726,15 +731,18 @@ abstract class TypeMirror implements DeclarationMirror {
726
731
727
732
728
733
/**
729
- * Checks the subtype relationship, denoted by [:<::] in the language
730
- * specification. This is the type relationship used in [:is:] test checks.
734
+ * Checks the subtype relationship, denoted by `<:` in the language
735
+ * specification.
736
+ *
737
+ * This is the type relationship used in `is` test checks.
731
738
*/
732
739
bool isSubtypeOf (TypeMirror other);
733
740
734
741
/**
735
- * Checks the assignability relationship, denoted by [:<=>:] in the language
736
- * specification. This is the type relationship tested on assignment in
737
- * checked mode.
742
+ * Checks the assignability relationship, denoted by `<=>` in the language
743
+ * specification.
744
+ *
745
+ * This is the type relationship tested on assignment in checked mode.
738
746
*/
739
747
bool isAssignableTo (TypeMirror other);
740
748
}
@@ -806,9 +814,10 @@ abstract class ClassMirror implements TypeMirror, ObjectMirror {
806
814
807
815
/**
808
816
* The mixin of this class.
809
- * If this class is the result of a mixin application of the
810
- * form S with M, returns a class mirror on M.
811
- * Otherwise returns a class mirror on [reflectee] .
817
+ *
818
+ * If this class is the result of a mixin application of the form S with M,
819
+ * returns a class mirror on M. Otherwise returns a class mirror on
820
+ * [reflectee] .
812
821
*/
813
822
ClassMirror get mixin ;
814
823
@@ -817,52 +826,50 @@ abstract class ClassMirror implements TypeMirror, ObjectMirror {
817
826
// /// reflected class.
818
827
// DeclarationMirror instanceLookup(Symbol name);
819
828
820
- /**
829
+ /**
821
830
* Invokes the named constructor and returns a mirror on the result.
822
831
*
823
- * Let *c* be the class reflected by this mirror
824
- * let *a1, ..., an* be the elements of [positionalArguments]
832
+ * Let *c* be the class reflected by this mirror,
833
+ * let *a1, ..., an* be the elements of [positionalArguments] ,
825
834
* let *k1, ..., km* be the identifiers denoted by the elements of
826
- * [namedArguments.keys]
835
+ * [namedArguments.keys] ,
827
836
* and let *v1, ..., vm* be the elements of [namedArguments.values] .
828
- * If [constructorName] was created from the empty string
829
- * Then this method will execute the instance creation expression
830
- * *new c(a1, ..., an, k1: v1, ..., km: vm)*
831
- * in a scope that has access to the private members
832
- * of *c*. Otherwise, let
833
- * *f* be the simple name of the constructor denoted by [constructorName]
834
- * Then this method will execute the instance creation expression
835
- * *new c.f(a1, ..., an, k1: v1, ..., km: vm)*
836
- * in a scope that has access to the private members
837
- * of *c*.
837
+ *
838
+ * If [constructorName] was created from the empty string, then this method
839
+ * will execute the instance creation expression
840
+ * *new c(a1, ..., an, k1: v1, ..., km: vm)* in a scope that has access to
841
+ * the private members of *c*.
842
+ *
843
+ * Otherwise, let *f* be the simple name of the constructor denoted by
844
+ * [constructorName] . Then this method will execute the instance creation
845
+ * expression *new c.f(a1, ..., an, k1: v1, ..., km: vm)* in a scope that has
846
+ * access to the private members of *c*.
847
+ *
838
848
* In either case:
839
- * If the expression evaluates to a result *r*, this method returns
840
- * the result of calling [reflect] \(*r*\).
841
- * If evaluating the expression causes a compilation error
842
- * the effect is the same as if a non-reflective compilation error
843
- * had been encountered.
844
- * If evaluating the expression throws an exception *e*
845
- * (that it does not catch)
846
- * this method throws *e*.
849
+ *
850
+ * * If the expression evaluates to a result *r*, this method returns the
851
+ * result of calling [reflect] \(*r*\).
852
+ * * If evaluating the expression causes a compilation error, the effect is
853
+ * the same as if a non-reflective compilation error had been encountered.
854
+ * * If evaluating the expression throws an exception *e* (that it does not
855
+ * catch), this method throws *e*.
847
856
*/
848
857
InstanceMirror newInstance (Symbol constructorName,
849
858
List positionalArguments,
850
859
[Map <Symbol ,dynamic > namedArguments]);
851
860
852
861
/**
853
- * Returns [:true:] if this mirror is equal to [other] .
854
- * Otherwise returns [:false:] .
862
+ * Whether this mirror is equal to [other] .
855
863
*
856
864
* The equality holds if and only if
857
- * (1) [other] is a mirror of the same kind
858
- * and
859
- * (2) This mirror and [other] reflect the same class.
860
865
*
861
- * Note that if the reflected class is an invocation of
862
- * a generic class,(2) implies that the reflected class
863
- * and [other] have equal type arguments.
866
+ * 1. [other] is a mirror of the same kind, and
867
+ * 2. This mirror and [other] reflect the same class.
868
+ *
869
+ * Note that if the reflected class is an invocation of a generic class, 2.
870
+ * implies that the reflected class and [other] have equal type arguments.
864
871
*/
865
- bool operator == (other);
872
+ bool operator == (other);
866
873
867
874
/**
868
875
* Returns whether the class denoted by the receiver is a subclass of the
@@ -897,8 +904,7 @@ abstract class FunctionTypeMirror implements ClassMirror {
897
904
}
898
905
899
906
/**
900
- * A [TypeVariableMirror] represents a type parameter of a generic
901
- * type.
907
+ * A [TypeVariableMirror] represents a type parameter of a generic type.
902
908
*/
903
909
abstract class TypeVariableMirror extends TypeMirror {
904
910
/**
@@ -915,16 +921,15 @@ abstract class TypeVariableMirror extends TypeMirror {
915
921
bool get isStatic;
916
922
917
923
/**
918
- * Returns [:true:] if this mirror is equal to [other] .
919
- * Otherwise returns [:false:] .
924
+ * Whether [other] is a [TypeVariableMirror] on the same type variable as this
925
+ * mirror .
920
926
*
921
927
* The equality holds if and only if
922
- * (1) [other] is a mirror of the same kind
923
- * and
924
- * (2) [:simpleName == other.simpleName:] and
925
- * [:owner == other.owner:] .
928
+ *
929
+ * 1. [other] is a mirror of the same kind, and
930
+ * 2. [:simpleName == other.simpleName:] and [:owner == other.owner:] .
926
931
*/
927
- bool operator == (other);
932
+ bool operator == (other);
928
933
}
929
934
930
935
/**
@@ -933,11 +938,10 @@ abstract class TypeVariableMirror extends TypeMirror {
933
938
abstract class TypedefMirror implements TypeMirror {
934
939
/**
935
940
* The defining type for this typedef.
936
- * If the the type referred to by the reflectee is a function type
937
- * *F*, the result will be [:FunctionTypeMirror:] reflecting *F*
938
- * which is abstract and has an abstract method [:call:] whose
939
- * signature corresponds to *F*.
940
941
*
942
+ * If the the type referred to by the reflectee is a function type *F*, the
943
+ * result will be [:FunctionTypeMirror:] reflecting *F* which is abstract
944
+ * and has an abstract method [:call:] whose signature corresponds to *F*.
941
945
* For instance [:void f(int):] is the referent for [:typedef void f(int):] .
942
946
*/
943
947
FunctionTypeMirror get referent;
@@ -1046,15 +1050,14 @@ abstract class MethodMirror implements DeclarationMirror {
1046
1050
bool get isFactoryConstructor;
1047
1051
1048
1052
/**
1049
- * Returns true if this mirror is equal to [other] .
1053
+ * Whether this mirror is equal to [other] .
1050
1054
*
1051
1055
* The equality holds if and only if
1052
- * (1) [other] is a mirror of the same kind
1053
- * and
1054
- * (2) [:simpleName == other.simpleName:] and
1055
- * [:owner == other.owner:] .
1056
+ *
1057
+ * 1. [other] is a mirror of the same kind, and
1058
+ * 2. [:simpleName == other.simpleName:] and [:owner == other.owner:] .
1056
1059
*/
1057
- bool operator == (other);
1060
+ bool operator == (other);
1058
1061
}
1059
1062
1060
1063
/**
@@ -1088,15 +1091,14 @@ abstract class VariableMirror implements DeclarationMirror {
1088
1091
bool get isConst;
1089
1092
1090
1093
/**
1091
- * Returns true if this mirror is equal to [other] .
1094
+ * Whether this mirror is equal to [other] .
1092
1095
*
1093
1096
* The equality holds if and only if
1094
- * (1) [other] is a mirror of the same kind
1095
- * and
1096
- * (2) [:simpleName == other.simpleName:] and
1097
- * [:owner == other.owner:] .
1097
+ *
1098
+ * 1. [other] is a mirror of the same kind, and
1099
+ * 2. [:simpleName == other.simpleName:] and [:owner == other.owner:] .
1098
1100
*/
1099
- bool operator == (other);
1101
+ bool operator == (other);
1100
1102
}
1101
1103
1102
1104
/**
@@ -1127,10 +1129,14 @@ abstract class ParameterMirror implements VariableMirror {
1127
1129
bool get hasDefaultValue;
1128
1130
1129
1131
/**
1130
- * If this is a required parameter, returns [:null:] . Otherwise returns a
1131
- * mirror on the default value for this parameter. If no default is declared
1132
- * for an optional parameter, the default is [:null:] and a mirror on [:null:]
1133
- * is returned.
1132
+ * Returns the default value of an optional parameter.
1133
+ *
1134
+ * Returns an [InstanceMirror] on the (compile-time constant)
1135
+ * default value for an optional parameter.
1136
+ * If no default value is declared, it defaults to `null`
1137
+ * and a mirror of `null` is returned.
1138
+ *
1139
+ * Returns `null` for a required parameter.
1134
1140
*/
1135
1141
InstanceMirror get defaultValue;
1136
1142
}
0 commit comments