Dart API Referencedart:mirrorsParameterMirror

ParameterMirror abstract class

A ParameterMirror reflects a Dart formal parameter declaration.

abstract class ParameterMirror implements VariableMirror {
  /**
   * A mirror on the type of this parameter.
   */
  TypeMirror get type;

  /**
   * Is this parameter optional?
   */
  bool get isOptional;

  /**
   * Is this parameter named?
   */
  bool get isNamed;

  /**
   * Does this parameter have a default value?
   */
  bool get hasDefaultValue;

  /**
   * A mirror on the default value for this parameter, if it exists.
   *
   * TODO(turnidge): String may not be a good representation of this
   * at runtime.
   */
  String get defaultValue;
}

Implements

VariableMirror

Properties

final String defaultValue #

A mirror on the default value for this parameter, if it exists.

TODO(turnidge): String may not be a good representation of this at runtime.

String get defaultValue;

final bool hasDefaultValue #

Does this parameter have a default value?

bool get hasDefaultValue;

final bool isFinal #

inherited from VariableMirror

Is the reflectee a final variable?

bool get isFinal;

final bool isNamed #

Is this parameter named?

bool get isNamed;

final bool isOptional #

Is this parameter optional?

bool get isOptional;

final bool isPrivate #

inherited from DeclarationMirror

Is this declaration private?

Note that for libraries, this will be false.

bool get isPrivate;

final bool isStatic #

inherited from VariableMirror

Is the reflectee a static variable?

For the purposes of the mirror library, top-level variables are implicitly declared static.

bool get isStatic;

final bool isTopLevel #

inherited from DeclarationMirror

Is this declaration top-level?

This is defined to be equivalent to: mirror.owner !== null && mirror.owner is LibraryMirror

bool get isTopLevel;

final SourceLocation location #

inherited from DeclarationMirror

The source location of this Dart language entity.

SourceLocation get location;

final MirrorSystem mirrors #

inherited from Mirror

The MirrorSystem that contains this mirror.

MirrorSystem get mirrors;

final DeclarationMirror owner #

inherited from DeclarationMirror

A mirror on the owner of this function. This is the declaration immediately surrounding the reflectee.

Note that for libraries, the owner will be null.

DeclarationMirror get owner;

final String qualifiedName #

inherited from DeclarationMirror

The fully-qualified name for this Dart language entity.

This name is qualified by the name of the owner. For instance, the qualified name of a method 'method' in class 'Class' in library 'library' is 'library.Class.method'.

TODO(turnidge): Specify whether this name is unique. Currently this is a gray area due to lack of clarity over whether library names are unique.

String get qualifiedName;

final String simpleName #

inherited from DeclarationMirror

The simple name for this Dart language entity.

The simple name is in most cases the the identifier name of the entity, such as 'method' for a method void method() {...} or 'mylibrary' for a #library('mylibrary'); declaration.

String get simpleName;

final TypeMirror type #

A mirror on the type of this parameter.

TypeMirror get type;