Download the Dart SDK source code
Github.com/dart-lang/s…
Analyze the DART: Mirror structure
Generate UML diagrams
- Configure the DCDG tool
Github.com/glesica/dcd…
- Add pubspec. The yaml to
The dart - SDK - 2.13 x/SDK/SDK
, level with lib - in
The dart - SDK - 2.13 x/SDK/SDK
The dart: Mirror PlantUML diagram is generated
dcdg -i "^[^_]*Mirror" -o mirrors.puml
Copy the code
- Replace redundant namespaces in mirrors. Puml
File: : : : : : : Users: : wangkun42: : workspace: : dart – SDK – 2.13 x: : the SDK: : the SDK: : lib – > the dart
dart::mirrors::mirrors.dart
-> dart::mirrors
@startuml set namespaceSeparator :: class "js_runtime::js_helper.dart::JSInvocationMirror" { } "dart::core::Invocation" <|-- "js_runtime::js_helper.dart::JSInvocationMirror" class "dart::_internal::vm::lib::mirrors_patch.dart::MirrorSystem" { } abstract class "dart::mirrors::MirrorSystem" { } abstract class "dart::mirrors::Mirror" { } abstract class "dart::mirrors::IsolateMirror" { } "dart::mirrors::Mirror" <|-- "dart::mirrors::IsolateMirror" abstract class "dart::mirrors::DeclarationMirror" { } "dart::mirrors::Mirror" <|-- "dart::mirrors::DeclarationMirror" abstract class "dart::mirrors::ObjectMirror" { } "dart::mirrors::Mirror" <|-- "dart::mirrors::ObjectMirror" abstract class "dart::mirrors::InstanceMirror" { } "dart::mirrors::ObjectMirror" <|-- "dart::mirrors::InstanceMirror" abstract class "dart::mirrors::ClosureMirror" { } "dart::mirrors::InstanceMirror" <|-- "dart::mirrors::ClosureMirror" abstract class "dart::mirrors::LibraryMirror" { } "dart::mirrors::DeclarationMirror" <|-- "dart::mirrors::LibraryMirror" "dart::mirrors::ObjectMirror" <|-- "dart::mirrors::LibraryMirror" abstract class "dart::mirrors::LibraryDependencyMirror" { } "dart::mirrors::Mirror" <|-- "dart::mirrors::LibraryDependencyMirror" abstract class "dart::mirrors::CombinatorMirror" { } "dart::mirrors::Mirror" <|-- "dart::mirrors::CombinatorMirror" abstract class "dart::mirrors::TypeMirror" { } "dart::mirrors::DeclarationMirror" <|-- "dart::mirrors::TypeMirror" abstract class "dart::mirrors::ClassMirror" { } "dart::mirrors::TypeMirror" <|-- "dart::mirrors::ClassMirror" "dart::mirrors::ObjectMirror" <|-- "dart::mirrors::ClassMirror" abstract class "dart::mirrors::FunctionTypeMirror" { } "dart::mirrors::ClassMirror" <|-- "dart::mirrors::FunctionTypeMirror" abstract class "dart::mirrors::TypeVariableMirror" { } "dart::mirrors::TypeMirror" <|-- "dart::mirrors::TypeVariableMirror" abstract class "dart::mirrors::TypedefMirror" { } "dart::mirrors::TypeMirror" <|-- "dart::mirrors::TypedefMirror" abstract class "dart::mirrors::MethodMirror" { } "dart::mirrors::DeclarationMirror" <|-- "dart::mirrors::MethodMirror" abstract class "dart::mirrors::VariableMirror" { } "dart::mirrors::DeclarationMirror" <|-- "dart::mirrors::VariableMirror" abstract class "dart::mirrors::ParameterMirror" { } "dart::mirrors::VariableMirror" <|-- "dart::mirrors::ParameterMirror" class "dart::mirrors::MirrorsUsed" { } @endumlCopy the code
- Generate SVG from the PlantUML file
curl https://plantuml-service.herokuapp.com/svg --data-binary @mirrors.puml -o mirrors.svg
Copy the code
- Core dart: mirrors