FunctionReflection<O, R> constructor
FunctionReflection<O, R> (
- ClassReflection<
O> classReflection, - Type declaringType,
- String name,
- TypeReflection? returnType,
- bool returnNullable,
- List<
ParameterReflection> ? normalParameters, - List<
ParameterReflection> ? optionalParameters, - Map<
String, ParameterReflection> ? namedParameters, - List<
Object> ? annotations,
Implementation
FunctionReflection(
super.classReflection,
super.declaringType,
this.name,
this.returnType,
this.returnNullable,
List<ParameterReflection>? normalParameters,
List<ParameterReflection>? optionalParameters,
Map<String, ParameterReflection>? namedParameters,
List<Object>? annotations,
) : normalParameters = normalParameters == null || normalParameters.isEmpty
? _parametersEmpty
: UnmodifiableListView<ParameterReflection>(normalParameters),
optionalParameters =
optionalParameters == null || optionalParameters.isEmpty
? _parametersEmpty
: UnmodifiableListView<ParameterReflection>(optionalParameters),
namedParameters = namedParameters == null || namedParameters.isEmpty
? _namedParametersEmpty
: Map<String, ParameterReflection>.unmodifiable(namedParameters),
annotations = annotations == null || annotations.isEmpty
? _annotationsEmpty
: UnmodifiableListView<Object>(annotations);