argumentsAsTypeInfo property

List<TypeInfo> argumentsAsTypeInfo

Returns the arguments of this type as TypeInfo.

Implementation

List<TypeInfo> get argumentsAsTypeInfo {
  var argumentsTypeInfo = _argumentsTypeInfo;
  if (argumentsTypeInfo != null) {
    return UnmodifiableListView<TypeInfo>(argumentsTypeInfo);
  }

  var argumentsTypeReflection = _argumentsTypeReflection;
  if (argumentsTypeReflection != null) {
    var args = argumentsTypeReflection
        .map((e) => e.typeInfo)
        .toList(growable: false);
    return UnmodifiableListView<TypeInfo>(args);
  }

  var argumentsUnresolved = _argumentsUnresolved;
  if (argumentsUnresolved != null) {
    var args = argumentsUnresolved
        .map((e) => TypeInfo.from(e))
        .toList(growable: false);
    return UnmodifiableListView<TypeInfo>(args);
  }

  return UnmodifiableListView(<TypeInfo>[]);
}