FunctionReflection<O, R> constructor

FunctionReflection<O, R>(
  1. ClassReflection<O> classReflection,
  2. Type declaringType,
  3. String name,
  4. TypeReflection? returnType,
  5. bool returnNullable,
  6. List<ParameterReflection>? normalParameters,
  7. List<ParameterReflection>? optionalParameters,
  8. Map<String, ParameterReflection>? namedParameters,
  9. 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);