owner property
A mirror on the owner of this Dart language entity.
The owner is the declaration immediately surrounding the reflectee:
- For a library, the owner is
null
. - For a class declaration, typedef or top level function or variable, the owner is the enclosing library.
- For a mixin application
S with M
, the owner is the owner ofM
. - For a constructor, the owner is the immediately enclosing class.
- For a method, instance variable or a static variable, the owner is the immediately enclosing class, unless the class is a mixin application
S with M
, in which case the owner isM
. Note thatM
may be an invocation of a generic. - For a parameter, local variable or local function the owner is the immediately enclosing function.
Implementation
DeclarationMirror? get owner;
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-mirrors/DeclarationMirror/owner.html