@@ -74,20 +74,20 @@ extension FFMSwift2JavaGenerator {
7474 // We have to write all types to their corresponding output file that matches the file they were declared in,
7575 // because otherwise SwiftPM plugins will not pick up files apropriately -- we expect 1 output +SwiftJava.swift file for every input.
7676
77- let filteredTypes : [ String : ImportedNominalType ]
77+ let filteredTypes : [ String : ExtractedNominalType ]
7878 if let singleType = config. singleType {
79- filteredTypes = self . analysis. importedTypes . filter { $0. key == singleType }
79+ filteredTypes = self . analysis. extractedTypes . filter { $0. key == singleType }
8080 } else {
81- filteredTypes = self . analysis. importedTypes
81+ filteredTypes = self . analysis. extractedTypes
8282 }
8383
84- for group: ( key: String , value: [ Dictionary < String , ImportedNominalType > . Element ] ) in Dictionary (
84+ for group: ( key: String , value: [ Dictionary < String , ExtractedNominalType > . Element ] ) in Dictionary (
8585 grouping: filteredTypes,
8686 by: { $0. value. sourceFilePath } ,
8787 ) {
8888 log. warning ( " Writing types in file group: \( group. key) : \( group. value. map ( \. key) ) " )
8989
90- let importedTypesForThisFile = group. value
90+ let extractedTypesForThisFile = group. value
9191 . map ( \. value)
9292 . sorted ( by: { $0. qualifiedName < $1. qualifiedName } )
9393
@@ -105,7 +105,7 @@ extension FFMSwift2JavaGenerator {
105105 )
106106 self . lookupContext. symbolTable. printImportedModules ( & printer)
107107
108- for ty in importedTypesForThisFile {
108+ for ty in extractedTypesForThisFile {
109109 log. info ( " Printing Swift thunks for type: \( ty. qualifiedName. bold) " )
110110 printer. printSeparator ( " Thunks for \( ty. qualifiedName) " )
111111
@@ -148,7 +148,7 @@ extension FFMSwift2JavaGenerator {
148148 self . lookupContext. symbolTable. printImportedModules ( & printer)
149149
150150 self . currentJavaIdentifiers = JavaIdentifierFactory (
151- self . analysis. importedGlobalFuncs + self . analysis. importedGlobalVariables
151+ self . analysis. extractedGlobalFuncs + self . analysis. extractedGlobalVariables
152152 )
153153
154154 for thunk in stt. renderGlobalThunks ( ) {
@@ -157,7 +157,7 @@ extension FFMSwift2JavaGenerator {
157157 }
158158 }
159159
160- public func printSwiftThunkSources( _ printer: inout CodePrinter, decl: ImportedFunc ) {
160+ public func printSwiftThunkSources( _ printer: inout CodePrinter, decl: ExtractedFunc ) {
161161 let stt = SwiftThunkTranslator ( self )
162162
163163 for thunk in stt. render ( forFunc: decl) {
@@ -166,7 +166,7 @@ extension FFMSwift2JavaGenerator {
166166 }
167167 }
168168
169- package func printSwiftThunkSources( _ printer: inout CodePrinter, ty: ImportedNominalType ) throws {
169+ package func printSwiftThunkSources( _ printer: inout CodePrinter, ty: ExtractedNominalType ) throws {
170170 let stt = SwiftThunkTranslator ( self )
171171
172172 self . currentJavaIdentifiers = JavaIdentifierFactory (
@@ -191,22 +191,22 @@ struct SwiftThunkTranslator {
191191 func renderGlobalThunks( ) -> [ DeclSyntax ] {
192192 var decls : [ DeclSyntax ] = [ ]
193193 decls. reserveCapacity (
194- st. analysis. importedGlobalVariables . count + st. analysis. importedGlobalFuncs . count
194+ st. analysis. extractedGlobalVariables . count + st. analysis. extractedGlobalFuncs . count
195195 )
196196
197- for decl in st. analysis. importedGlobalVariables {
197+ for decl in st. analysis. extractedGlobalVariables {
198198 decls. append ( contentsOf: render ( forFunc: decl) )
199199 }
200200
201- for decl in st. analysis. importedGlobalFuncs {
201+ for decl in st. analysis. extractedGlobalFuncs {
202202 decls. append ( contentsOf: render ( forFunc: decl) )
203203 }
204204
205205 return decls
206206 }
207207
208208 /// Render all the thunks that make Swift methods accessible to Java.
209- func renderThunks( forType nominal: ImportedNominalType ) -> [ DeclSyntax ] {
209+ func renderThunks( forType nominal: ExtractedNominalType ) -> [ DeclSyntax ] {
210210 var decls : [ DeclSyntax ] = [ ]
211211 decls. reserveCapacity (
212212 1 + nominal. initializers. count + nominal. variables. count + nominal. methods. count
@@ -233,7 +233,7 @@ struct SwiftThunkTranslator {
233233 }
234234
235235 /// Accessor to get the `T.self` of the Swift type, without having to rely on mangled name lookups.
236- func renderSwiftTypeAccessor( _ nominal: ImportedNominalType ) -> DeclSyntax {
236+ func renderSwiftTypeAccessor( _ nominal: ExtractedNominalType ) -> DeclSyntax {
237237 let funcName = SwiftKitPrinting . Names. getType (
238238 module: st. swiftModuleName,
239239 nominal: nominal,
@@ -248,7 +248,7 @@ struct SwiftThunkTranslator {
248248 """
249249 }
250250
251- func render( forFunc decl: ImportedFunc ) -> [ DeclSyntax ] {
251+ func render( forFunc decl: ExtractedFunc ) -> [ DeclSyntax ] {
252252 st. log. trace ( " Rendering thunks for: \( decl. displayName) " )
253253
254254 let thunkName = st. thunkNameRegistry. functionThunkName ( decl: decl)
@@ -265,7 +265,7 @@ struct SwiftThunkTranslator {
265265 }
266266
267267 /// Render special thunks for known types like Foundation.Data
268- func renderSpecificTypeThunks( _ nominal: ImportedNominalType ) -> [ DeclSyntax ] {
268+ func renderSpecificTypeThunks( _ nominal: ExtractedNominalType ) -> [ DeclSyntax ] {
269269 guard let knownType = nominal. swiftNominal. knownTypeKind else {
270270 return [ ]
271271 }
@@ -279,7 +279,7 @@ struct SwiftThunkTranslator {
279279 }
280280
281281 /// Render Swift thunks for Foundation.Data helper methods
282- private func renderFoundationDataThunks( _ nominal: ImportedNominalType ) -> [ DeclSyntax ] {
282+ private func renderFoundationDataThunks( _ nominal: ExtractedNominalType ) -> [ DeclSyntax ] {
283283 let thunkName = " swiftjava_ \( st. swiftModuleName) _ \( nominal. swiftNominal. name) _copyBytes__ "
284284 let qualifiedName = nominal. swiftNominal. qualifiedName
285285
0 commit comments