LibraryElement2 class abstract

A library.

Clients may not extend, implement or mix-in this class.

Implemented types

Constructors

LibraryElement2()

Properties

baseElement Element2
The non-Member version of this element.
no setterinherited
children2 List<Element2>
The children of this element.
no setterinherited
classes List<ClassElement2>
The classes defined in this library.
no setter
displayName String
The display name of this element, or an empty string if the element does not have a name.
no setterinherited
documentationComment String?
The content of the documentation comment (including delimiters) for this element or fragment.
no setterinherited
enclosingElement2 Element2?
The element that either physically or logically encloses this element.
no setterinherited
entryPoint2 TopLevelFunctionElement?
The entry point for this library.
no setter
enums List<EnumElement2>
The enums defined in this library.
no setter
exportedLibraries2 List<LibraryElement2>
The libraries that are exported from this library.
no setter
exportNamespace → Namespace
The export Namespace of this library.
no setter
extensions List<ExtensionElement2>
The extensions defined in this library.
no setter
extensionTypes List<ExtensionTypeElement2>
The extension types defined in this library.
no setter
featureSet FeatureSet
The set of features available to this library.
no setter
firstFragment LibraryFragment
The first fragment in the chain of fragments that are merged to make this element.
no setteroverride
fragments List<LibraryFragment>
The fragments this library consists of.
no setter
getters List<GetterElement>
The getters defined in this library.
no setter
hashCode int
The hash code for this object.
no setterinherited
id int
The unique integer identifier of this element.
no setterinherited
identifier String
The identifier that uniquely identifies this element among the children of this element's parent.
no setter
isDartAsync bool
Whether the library is the dart:async library.
no setter
isDartCore bool
Whether the library is the dart:core library.
no setter
isInSdk bool
Whether the library is part of the SDK.
no setter
isPrivate bool
Whether this element is private.
no setterinherited
isPublic bool
Whether this element is public.
no setterinherited
isSynthetic bool
Whether this element is synthetic.
no setterinherited
kind ElementKind
The kind of this element.
no setterinherited
languageVersion LibraryLanguageVersion
The language version for this library.
no setter
library2 LibraryElement2
Library that contains this element.
no setteroverride
loadLibraryFunction2 TopLevelFunctionElement
The element representing the synthetic function loadLibrary.
no setter
location ElementLocation?
The location of this element in the element model.
no setterinherited
lookupName String?
The name to use for lookup in maps.
no setterinherited
metadata2 Metadata
The metadata associated with the element or fragment.
no setterinherited
mixins List<MixinElement2>
The mixins defined in this library.
no setter
name3 String?
The name of this element.
no setterinherited
nonSynthetic2 Element2
The non-synthetic element that caused this element to be created.
no setterinherited
publicNamespace → Namespace
The public Namespace of this library.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
session AnalysisSession
The analysis session in which this library is defined.
no setteroverride
setters List<SetterElement>
The setters defined in this library.
no setter
topLevelFunctions List<TopLevelFunctionElement>
The functions defined in this library.
no setter
topLevelVariables List<TopLevelVariableElement2>
The top level variables defined in this library.
no setter
typeAliases List<TypeAliasElement2>
The type aliases defined in this library.
no setter
typeProvider TypeProvider
The TypeProvider that is used in this library.
no setter
typeSystem TypeSystem
The TypeSystem that is used in this library.
no setter
uri Uri
The canonical URI of the library.
no setter

Methods

accept2<T>(ElementVisitor2<T> visitor) → T?
Uses the given visitor to visit this element.
inherited
displayString2({bool multiline = false, bool preferTypeAlias = false}) String
The presentation of this element as it should appear when presented to users.
inherited
getClass2(String name) ClassElement2?
Returns the class defined in this library that has the given name.
getEnum2(String name) EnumElement2?
Returns the enum defined in this library that has the given name.
getExtendedDisplayName2({String? shortName}) String
Returns a display name for the given element that includes the path to the compilation unit in which the type is defined. If shortName is null then displayName will be used as the name of this element. Otherwise the provided name will be used.
inherited
getExtension(String name) ExtensionElement2?
Returns the extension defined in this library that has the given name.
getExtensionType(String name) ExtensionTypeElement2?
Returns the extension type defined in this library that has the given name.
getGetter(String name) GetterElement?
Returns the getter defined in this library that has the given name.
getMixin2(String name) MixinElement2?
Returns the mixin defined in this library that has the given name.
getSetter(String name) SetterElement?
Returns the setter defined in this library that has the given name.
getTopLevelFunction(String name) TopLevelFunctionElement?
Returns the function defined in this library that has the given name.
getTopLevelVariable(String name) TopLevelVariableElement2?
Returns the top-level variable defined in this library that has the given name.
getTypeAlias(String name) TypeAliasElement2?
Returns the type alias defined in this library that has the given name.
isAccessibleIn2(LibraryElement2 library) bool
Whether the element, assuming that it is within scope, is accessible to code in the given library.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
thisOrAncestorMatching2(bool predicate(Element2)) Element2?
Returns either this element or the most immediate ancestor of this element for which the predicate returns true.
inherited
thisOrAncestorOfType2<E extends Element2>() → E?
Returns either this element or the most immediate ancestor of this element that has the given type.
inherited
toString() String
A string representation of this object.
inherited
visitChildren2<T>(ElementVisitor2<T> visitor) → void
Uses the given visitor to visit all of the children of this element. There is no guarantee of the order in which the children will be visited.
inherited

Operators

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