ClassElement2 class abstract
A class.
The class can be defined by either a class declaration (with a class body), or a mixin application (without a class body).
Clients may not extend, implement or mix-in this class.
- Implemented types
Constructors
Properties
-
allSupertypes
→ List<
InterfaceType> -
All the supertypes defined for this element and its supertypes.
no setterinherited
- 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 setterinherited
- 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 → ClassFragment
-
The first fragment in the chain of fragments that are merged to make this
element. Or
null
if this element is synthetic, so has no fragments.no setteroverride -
getters2
→ List<
GetterElement> -
The getters declared in this element.
no setterinherited
- hasAlwaysThrows → bool
-
Whether the receiver has an annotation of the form
@alwaysThrows
.no setterinherited - hasDeprecated → bool
-
Whether the receiver has an annotation of the form
@deprecated
or@Deprecated('..')
.no setterinherited - hasDoNotStore → bool
-
Whether the receiver has an annotation of the form
@doNotStore
.no setterinherited - hasDoNotSubmit → bool
-
Whether the receiver has an annotation of the form
@doNotSubmit
.no setterinherited - hasFactory → bool
-
Whether the receiver has an annotation of the form
@factory
.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- hasImmutable → bool
-
Whether the receiver has an annotation of the form
@immutable
.no setterinherited - hasInternal → bool
-
Whether the receiver has an annotation of the form
@internal
.no setterinherited - hasIsTest → bool
-
Whether the receiver has an annotation of the form
@isTest
.no setterinherited - hasIsTestGroup → bool
-
Whether the receiver has an annotation of the form
@isTestGroup
.no setterinherited - hasJS → bool
-
Whether the receiver has an annotation of the form
@JS(..)
.no setterinherited - hasLiteral → bool
-
Whether the receiver has an annotation of the form
@literal
.no setterinherited - hasMustBeConst → bool
-
Whether the receiver has an annotation of the form
@mustBeConst
.no setterinherited - hasMustBeOverridden → bool
-
Whether the receiver has an annotation of the form
@mustBeOverridden
.no setterinherited - hasMustCallSuper → bool
-
Whether the receiver has an annotation of the form
@mustCallSuper
.no setterinherited - hasNonFinalField → bool
-
Whether the class or its superclass declares a non-final instance field.
no setter
- hasNonVirtual → bool
-
Whether the receiver has an annotation of the form
@nonVirtual
.no setterinherited - hasOptionalTypeArgs → bool
-
Whether the receiver has an annotation of the form
@optionalTypeArgs
.no setterinherited - hasOverride → bool
-
Whether the receiver has an annotation of the form
@override
.no setterinherited - hasProtected → bool
-
Whether the receiver has an annotation of the form
@protected
.no setterinherited - hasRedeclare → bool
-
Whether the receiver has an annotation of the form
@redeclare
.no setterinherited - hasReopen → bool
-
Whether the receiver has an annotation of the form
@reopen
.no setterinherited - hasRequired → bool
-
Whether the receiver has an annotation of the form
@required
.no setterinherited - hasSealed → bool
-
Whether the receiver has an annotation of the form
@sealed
.no setterinherited - hasUseResult → bool
-
Whether the receiver has an annotation of the form
@useResult
or@UseResult('..')
.no setterinherited - hasVisibleForOverriding → bool
-
Whether the receiver has an annotation of the form
@visibleForOverriding
.no setterinherited - hasVisibleForTemplate → bool
-
Whether the receiver has an annotation of the form
@visibleForTemplate
.no setterinherited - hasVisibleForTesting → bool
-
Whether the receiver has an annotation of the form
@visibleForTesting
.no setterinherited - hasVisibleOutsideTemplate → bool
-
Whether the receiver has an annotation of the form
@visibleOutsideTemplate
.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 setterinherited
- isAbstract → bool
-
Whether the class is abstract.
no setter
- isBase → bool
-
Whether this class is a base class.
no setter
- isConstructable → bool
-
Whether the class can be instantiated.
no setter
- isDartCoreEnum → bool
-
Whether the class represents the class 'Enum' defined in
dart:core
.no setter - isDartCoreObject → bool
-
Whether the class represents the class 'Object' defined in
dart:core
.no setter - isExhaustive → bool
-
Whether the class is exhaustive.
no setter
- isFinal → bool
-
Whether the class is a final class.
no setter
- isInterface → bool
-
Whether the class is an interface class.
no setter
- isMixinApplication → bool
-
Whether the class is a mixin application.
no setter
- isMixinClass → bool
-
Whether the class is a mixin class.
no setter
- isPrivate → bool
-
Whether this element is private.
no setterinherited
- isPublic → bool
-
Whether this element is public.
no setterinherited
- isSealed → bool
-
Whether the class is a sealed class.
no setter
- 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
- isValidMixin → bool
-
Whether the class can validly be used as a mixin when defining another
class.
no setter
- 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
-
metadata
→ List<
ElementAnnotation> -
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 setterinherited
- name → 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
- sinceSdkVersion → Version?
-
The version where this SDK API was added.
no setterinherited
- supertype → InterfaceType?
-
The superclass of this element.
no setterinherited
- thisType → InterfaceType
-
The type of a
this
expression.no setterinherited -
typeParameters2
→ List<
TypeParameterElement2> -
The type parameters declared by this element directly.
no setterinherited
- unnamedConstructor2 → ConstructorElement2?
-
The unnamed constructor declared directly in this class.
no setterinherited
Methods
-
displayString2(
{bool multiline = false, bool preferTypeAlias = false}) → String -
The presentation of this element as it should appear when presented to
users.
inherited
-
instantiate(
{required List< DartType> typeArguments, required NullabilitySuffix nullabilitySuffix}) → InterfaceType -
Create the InterfaceType for this element with the given
typeArguments
andnullabilitySuffix
.inherited -
isAccessibleIn2(
LibraryElement2 library) → bool -
Whether the element, assuming that it is within scope, is accessible to
code in the given
library
.inherited -
isExtendableIn2(
LibraryElement2 library) → bool -
Whether the class, assuming that it is within scope, can be extended by
classes in the given
library
. -
isImplementableIn2(
LibraryElement2 library) → bool -
Whether the class, assuming that it is within scope, can be implemented by
classes, mixins, and enums in the given
library
. -
isMixableIn2(
LibraryElement2 library) → bool -
Whether the class, assuming that it is within scope, can be mixed-in by
classes and enums in the given
library
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
thisOrAncestorMatching2<
E extends Element2> (bool predicate(Element2)) → E? -
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited