MetadataLookup class final

Provides fast, structured access to constantIndex, functionIndex, and typeIndex within a MetadataIndex, enabling efficient lookup by namespace and name or by name alone.

Constructors

MetadataLookup(MetadataIndex index)
Creates a new MetadataLookup from a MetadataIndex.
factory

Properties

constantIndex HashMap<String, HashMap<String, Field>>
A map of Fields indexed by their namespace and name.
final
functionIndex HashMap<String, HashMap<String, MethodDef>>
A map of MethodDefs indexed by their namespace and name.
final
hashCode int
The hash code for this object.
no setterinherited
index MetadataIndex
The underlying MetadataIndex from which this lookup was created.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeIndex HashMap<String, HashMap<String, List<TypeDef>>>
A map of TypeDefs indexed by their namespace and name.
final

Methods

findConstant(String namespace, String name) Field
Finds a constant by its namespace and name.
findConstantByName(String name) Field
Finds a constant by its name across all namespaces.
findFunction(String namespace, String name) MethodDef
Finds a function by its namespace and name.
findFunctionByName(String name) MethodDef
Finds a function by its name across all namespaces.
findSingleType(String namespace, String name) TypeDef
Finds a single TypeDef matching the given namespace and name.
findSingleTypeByName(String name) TypeDef
Finds a single TypeDef matching the given name across all namespaces.
findTypes(String namespace, String name) Iterable<TypeDef>
Enumerates all TypeDef instances matching the given namespace and name.
findTypesByName(String name) Iterable<TypeDef>
Finds all TypeDef instances matching the name across all namespaces.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
tryFindConstant(String namespace, String name) Field?
Attempts to find a constant by its namespace and name.
tryFindConstantByName(String name) Field?
Attempts to find a constant by its name across all namespaces.
tryFindFunction(String namespace, String name) MethodDef?
Attempts to find a function by its namespace and name.
tryFindFunctionByName(String name) MethodDef?
Attempts to find a function by its name across all namespaces.
tryFindSingleType(String namespace, String name) TypeDef?
Attempts to find a single TypeDef matching the given namespace and name.
tryFindSingleTypeByName(String name) TypeDef?
Attempts to find a single TypeDef matching the given name across all namespaces.

Operators

operator ==(Object other) bool
The equality operator.
inherited