ApplicationLibraryGenerator class

Enhanced reflection generator that integrates analyzer capabilities directly into declaration classes for perfect generic type handling and accurate assignability checking.

Inheritance
Implementers

Constructors

ApplicationLibraryGenerator({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})

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 setter
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.
override
generateClass(ClassMirror classMirror, Package package, String libraryUri, Uri sourceUri) Future<ClassDeclaration>
Generate class declaration with integrated analyzer support
generateConstructor(MethodMirror constructorMirror, Element? parentElement, Package package, String libraryUri, Uri sourceUri, String className, ClassDeclaration parentClass) Future<ConstructorDeclaration>
Generate constructor declaration with analyzer support
generateEnum(ClassMirror enumMirror, Package package, String libraryUri, Uri sourceUri) Future<EnumDeclaration>
Generate enum declaration with analyzer support
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
generateLibrary(LibraryMirror libraryMirror) Future<LibraryDeclaration>
Generate library declaration with integrated analyzer support
generateMethod(MethodMirror methodMirror, Element? parentElement, Package package, String libraryUri, Uri sourceUri, String className, ClassDeclaration? parentClass) Future<MethodDeclaration>
Generate method declaration with analyzer support
generateMixin(ClassMirror mixinMirror, Package package, String libraryUri, Uri sourceUri) Future<MixinDeclaration>
Generate mixin declaration with analyzer support
generateTopLevelField(VariableMirror fieldMirror, Package package, String libraryUri, Uri sourceUri) Future<FieldDeclaration>
Generate top-level field with analyzer support
generateTopLevelMethod(MethodMirror methodMirror, Package package, String libraryUri, Uri sourceUri) Future<MethodDeclaration>
Generate top-level method with analyzer support
generateType(TypeMirror typeMirror, Package package, String libraryUri) Future<TypeDeclaration>
Generate type declaration with analyzer support
generateTypedef(TypedefMirror typedefMirror, Package package, String libraryUri, Uri sourceUri) Future<TypedefDeclaration>
Generate typedef declaration with analyzer support
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.
inherited
isPartOf(String content) bool
Parameters:
inherited
isSkippableJetLeafPackage(Uri identifier) bool
Checks if the file matches any of the excluded JetLeaf internal paths.
inherited
isTest(String content) bool
Checks if content is a test file.
inherited
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:
inherited
toString() String
A string representation of this object.
inherited

Operators

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