InterfaceElement2 class abstract
An element that defines an InterfaceType.
Clients may not extend, implement or mix-in this class.
- Implemented types
- Implementers
Constructors
Properties
-
allSupertypes
→ List<
InterfaceType> -
All the supertypes defined for this element and its supertypes.
no setter
- baseElement → Element2
-
The non-
Member
version of this element.no setterinherited -
children2
→ List<
Element2> -
The children of this element.
no setterinherited
-
constructors2
→ List<
ConstructorElement2> -
The constructors defined for this element.
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 → LibraryElement2
-
The element that either physically or logically encloses this element.
no setterinherited
-
fields2
→ List<
FieldElement2> -
The fields declared in this element.
no setterinherited
- firstFragment → InterfaceFragment
-
The first fragment in the chain of fragments that are merged to make this
element.
no setteroverride
-
getters2
→ List<
GetterElement> -
The getters declared in this element.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
The unique integer identifier of this element.
no setterinherited
-
interfaces
→ List<
InterfaceType> -
The interfaces that are implemented by this class.
no setter
- isPrivate → bool
-
Whether this element is private.
no setterinherited
- isPublic → bool
-
Whether this element is public.
no setterinherited
- isSimplyBounded → bool
-
If the element defines a type, indicates whether the type may safely
appear without explicit type arguments as the bounds of a type parameter
declaration.
no setterinherited
- isSynthetic → bool
-
Whether this element is synthetic.
no setterinherited
- kind → ElementKind
-
The kind of this element.
no setterinherited
- library2 → LibraryElement2
-
Library that contains this element.
no setterinherited
- 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
-
methods2
→ List<
MethodElement2> -
The methods declared in this element.
no setterinherited
-
mixins
→ List<
InterfaceType> -
The mixins that are applied to the class being extended in order to
derive the superclass of this class.
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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- session → AnalysisSession?
-
The analysis session in which this element is defined.
no setterinherited
-
setters2
→ List<
SetterElement> -
The setters declared in this element.
no setterinherited
- supertype → InterfaceType?
-
The superclass of this element.
no setter
- thisType → InterfaceType
-
The type of a
this
expression.no setteroverride -
typeParameters2
→ List<
TypeParameterElement2> -
The type parameters declared by this element directly.
no setterinherited
- unnamedConstructor2 → ConstructorElement2?
-
The unnamed constructor declared directly in this class.
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
-
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
isnull
then displayName will be used as the name of this element. Otherwise the provided name will be used.inherited -
getField2(
String name) → FieldElement2? -
Returns the field from fields2 that has the given
name
.inherited -
getGetter2(
String name) → GetterElement? -
Returns the getter from getters2 that has the given
name
.inherited -
getMethod2(
String name) → MethodElement2? -
Returns the method from methods2 that has the given
name
.inherited -
getNamedConstructor2(
String name) → ConstructorElement2? -
Returns the constructor from constructors2 that has the given
name
. -
getSetter2(
String name) → SetterElement? -
Returns the setter from setters2 that has the given
name
.inherited -
instantiate(
{required List< DartType> typeArguments, required NullabilitySuffix nullabilitySuffix}) → InterfaceType -
Create the InterfaceType for this element with the given
typeArguments
andnullabilitySuffix
. -
isAccessibleIn2(
LibraryElement2 library) → bool -
Whether the element, assuming that it is within scope, is accessible to
code in the given
library
.inherited -
lookUpGetter2(
{required String name, required LibraryElement2 library}) → GetterElement? -
Returns the element representing the getter that results from looking up
the given
name
in this class with respect to the givenlibrary
, ornull
if the look up fails.inherited -
lookUpInheritedMethod2(
{required String methodName, required LibraryElement2 library}) → MethodElement2? -
Returns the element representing the method that results from looking up
the given
methodName
in the superclass of this class with respect to the givenlibrary
, ornull
if the look up fails. -
lookUpMethod2(
{required String name, required LibraryElement2 library}) → MethodElement2? -
Returns the element representing the method that results from looking up
the given
name
in this class with respect to the givenlibrary
, ornull
if the look up fails.inherited -
lookUpSetter2(
{required String name, required LibraryElement2 library}) → SetterElement? -
Returns the element representing the setter that results from looking up
the given
name
in this class with respect to the givenlibrary
, ornull
if the look up fails.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
returnstrue
.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