InternalMockLibraryGenerator class

We create this class for the purpose of internal testing of the JetLeaf's framework. This class is only visible within the framework and not to be used by external users. For users who want to test their application, they can use the MockLibraryGenerator to bootstrap their application.

Inheritance

Constructors

InternalMockLibraryGenerator({required MirrorSystem mirrorSystem, required List<LibraryMirror> forceLoadedMirrors, required void onInfo(String), required void onWarning(String), required void onError(String), required RuntimeScannerConfiguration configuration, required List<Package> packages})
A mock implementation of LibraryGenerator that generates reflection metadata using Dart's mirrors API without filesystem operations.

Properties

configuration RuntimeScannerConfiguration
The runtime scan loader configuration
finalinherited
forceLoadedMirrors List<LibraryMirror>
List of mirrors that should be force-loaded
finalinherited
hashCode int
The hash code for this object.
no setterinherited
loader List<LibraryMirror>
no setterinherited
mirrorSystem MirrorSystem
The mirror system used for reflection
finalinherited
onError → void Function(String)
Callback for error messages
finalinherited
onInfo → void Function(String)
Callback for informational messages
finalinherited
onWarning → void Function(String)
Callback for warning messages
finalinherited
packages List<Package>
List of packages to process
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

generate(List<File> dartFiles) Future<List<LibraryDeclaration>>
Generates both reflection metadata and concrete reflector classes.
inherited
generateClass(ClassMirror classMirror, Package package, String libraryUri, Uri sourceUri) Future<ClassDeclaration>
Generate class declaration with integrated analyzer support
inherited
generateConstructor(MethodMirror constructorMirror, Element? parentElement, Package package, String libraryUri, Uri sourceUri, String className, ClassDeclaration parentClass) Future<ConstructorDeclaration>
Generate constructor declaration with analyzer support
inherited
generateEnum(ClassMirror enumMirror, Package package, String libraryUri, Uri sourceUri) Future<EnumDeclaration>
Generate enum declaration with analyzer support
inherited
generateField(VariableMirror fieldMirror, Element? parentElement, Package package, String libraryUri, Uri sourceUri, String className, ClassDeclaration? parentClass, String? sourceCode) Future<FieldDeclaration>
Generate field declaration with analyzer support
inherited
generateLibrary(LibraryMirror libraryMirror) Future<LibraryDeclaration>
Generate library declaration with integrated analyzer support
inherited
generateMethod(MethodMirror methodMirror, Element? parentElement, Package package, String libraryUri, Uri sourceUri, String className, ClassDeclaration? parentClass) Future<MethodDeclaration>
Generate method declaration with analyzer support
inherited
generateMixin(ClassMirror mixinMirror, Package package, String libraryUri, Uri sourceUri) Future<MixinDeclaration>
Generate mixin declaration with analyzer support
inherited
generateTopLevelField(VariableMirror fieldMirror, Package package, String libraryUri, Uri sourceUri) Future<FieldDeclaration>
Generate top-level field with analyzer support
inherited
generateTopLevelMethod(MethodMirror methodMirror, Package package, String libraryUri, Uri sourceUri) Future<MethodDeclaration>
Generate top-level method with analyzer support
inherited
generateType(TypeMirror typeMirror, Package package, String libraryUri) Future<TypeDeclaration>
Generate type declaration with analyzer support
inherited
generateTypedef(TypedefMirror typedefMirror, Package package, String libraryUri, Uri sourceUri) Future<TypedefDeclaration>
Generate typedef declaration with analyzer support
inherited
getPackageNameFromUri(dynamic uri) String?
Parameters:
inherited
hasMirrorImport(String content) bool
inherited
isNonLoadableJetLeafFile(Uri uri) bool
Checks if the file matches any of the excluded JetLeaf internal paths.
override
isPartOf(String content) bool
Parameters:
override
isSkippableJetLeafPackage(Uri identifier) bool
Checks if the file matches any of the excluded JetLeaf internal paths.
override
isTest(String content) bool
Checks if content is a test file.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveUri(Uri uri) Future<Uri?>
Parameters:
inherited
shouldNotIncludeLibrary(Uri uri, RuntimeScannerConfiguration configuration) Future<bool>
Parameters:
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited