blob: a8c16a1c48c5f59f051cefd270b1d23e6894b26b [file] [log] [blame]
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library fasta.type_declaration_builder;
import 'package:kernel/ast.dart' show DartType, Nullability;
import 'builder.dart';
import 'library_builder.dart';
import 'metadata_builder.dart';
import 'modifier_builder.dart';
import 'nullability_builder.dart';
import 'type_builder.dart';
abstract class TypeDeclarationBuilder implements ModifierBuilder {
bool get isNamedMixinApplication;
void set parent(Builder value);
List<MetadataBuilder> get metadata;
int get typeVariablesCount => 0;
DartType buildType(LibraryBuilder library,
NullabilityBuilder nullabilityBuilder, List<TypeBuilder> arguments,
[bool notInstanceContext]);
/// [arguments] have already been built.
DartType buildTypesWithBuiltArguments(LibraryBuilder library,
Nullability nullability, List<DartType> arguments);
abstract class TypeDeclarationBuilderImpl extends ModifierBuilderImpl
implements TypeDeclarationBuilder {
final List<MetadataBuilder> metadata;
final int modifiers;
final String name;
this.metadata, this.modifiers,, Builder parent, int charOffset,
[Uri fileUri])
: assert(modifiers != null),
super(parent, charOffset, fileUri);
bool get isNamedMixinApplication => false;
bool get isTypeDeclaration => true;
String get fullNameForErrors => name;
int get typeVariablesCount => 0;