AmbiguousBridgedNameException class
Thrown when a script names a bridged class by its simple name and two different libraries in scope declare a class under that name.
This mirrors Dart's own ambiguous-import rule. Once
package:tom_doc_scanner/… and package:tom_md2latex/… are both imported
unprefixed, the bare name MarkdownParser designates nothing in
particular; Dart rejects the reference and asks for a prefix. D4rt does the
same, because the alternative — binding the name to whichever bridge
happened to register last — silently picks a class the author never named,
and the script then fails somewhere else (or, worse, succeeds against the
wrong implementation).
candidatesByQualifier maps each qualifier a script can use (the package
name of the declaring library) to the source URI that qualifier resolves
to. Writing tom_doc_scanner.MarkdownParser selects one unambiguously.
- Inheritance
-
- Object
- D4rtException
- AmbiguousBridgedNameException
Constructors
-
AmbiguousBridgedNameException(String name, Map<
String, String> candidatesByQualifier) -
Creates the ambiguity error for
nameovercandidatesByQualifier.
Properties
-
candidatesByQualifier
→ Map<
String, String> -
Qualifier → source URI, for every candidate reachable by qualification.
final
- hasDirectiveContext ↔ bool
-
Whether message already names which module failed to load which target.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
The error message.
finalinherited
- name → String
-
The simple name that resolves to more than one bridged class.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trackedStackTrace ↔ StackTrace?
-
Stack trace captured by ErrorReporter when tracking is enabled.
getter/setter pairinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
revoke(
) → bool -
Revokes this error from the ErrorReporter.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited