type<T> function
TypeDescriptor<T>
type<T>({
- required String location,
- Constructor<
T> ? constructor, - FromMapConstructor<
T> ? fromMapConstructor, - FromArrayConstructor<
T> ? fromArrayConstructor, - List<
ParameterDescriptor> ? params, - List<
FieldDescriptor> ? fields, - List<
MethodDescriptor> ? methods, - TypeDescriptor? superClass,
- List<
Object> ? annotations, - bool isAbstract = false,
Implementation
TypeDescriptor<T> type<T>({
required String location,
Constructor<T>? constructor,
FromMapConstructor<T>? fromMapConstructor,
FromArrayConstructor<T>? fromArrayConstructor,
List<ParameterDescriptor>? params,
List<FieldDescriptor>? fields,
List<MethodDescriptor>? methods,
TypeDescriptor? superClass,
List<Object>? annotations,
bool isAbstract = false
}) {
TypeDescriptor<T>(location: location, isAbstract: isAbstract, constructor: constructor, fromArrayConstructor: fromArrayConstructor, fromMapConstructor: fromMapConstructor, annotations: annotations ?? [], constructorParameters: params ?? [], fields: fields ?? [], methods: methods, superClass: superClass);
// it could be the lazy type
return TypeDescriptor._byType[T]! as TypeDescriptor<T>;
}