newInstance method

InstanceMirror newInstance (Symbol constructorName, List positionalArguments, [ Map<Symbol, dynamic> namedArguments ])

Invokes the named constructor and returns a mirror on the result.

Let c be the class reflected by this mirror, let a1, ..., an be the elements of positionalArguments, let k1, ..., km be the identifiers denoted by the elements of namedArguments.keys, and let v1, ..., vm be the elements of namedArguments.values.

If constructorName was created from the empty string, then this method will execute the instance creation expression new c(a1, ..., an, k1: v1, ..., km: vm) in a scope that has access to the private members of c.

Otherwise, let f be the simple name of the constructor denoted by constructorName. Then this method will execute the instance creation expression new c.f(a1, ..., an, k1: v1, ..., km: vm) in a scope that has access to the private members of c.

In either case:

Implementation

InstanceMirror newInstance(Symbol constructorName, List positionalArguments,
    [Map<Symbol, dynamic> namedArguments]);