swiftlang / swift-java

Apache License 2.0
724 stars 27 forks source link

Java2Swift: Factor Java class translation into its own type & file #120

Closed DougGregor closed 3 weeks ago

DougGregor commented 3 weeks ago

The main function for translating a Java class into a sequence of Swift declarations was very large and very tangled. Refactor it into a separate class that more deliberately separates the analysis of the Java class (picking out what needs to be translated) from the actual rendering of the Swift declarations, then breaks that rendering down into more digestible pieces.

No (intended) functionality change here: this is cleanup to make it easier to implement some upcoming improvements.