swiftlang / swift-java

Apache License 2.0
724 stars 27 forks source link

JavaKit: add CustomJavaClassLoaderConstructible protocol #159

Closed lhoward closed 1 week ago

lhoward commented 1 week ago

Swift projections of Java classes can conform to CustomJavaClassLoaderConstructible, to provide a custom class loader to be used when constructing new instances.

Fixes: #154

lhoward commented 1 week ago

Bikeshed: CustomJavaClassLoaderConstructible or CustomJavaClassLoaderInitializable?

DougGregor commented 1 week ago

Bikeshed: CustomJavaClassLoaderConstructible or CustomJavaClassLoaderInitializable?

I'd prefer to avoid Constructible, since that's not really a thing in Swift. How about just CustomJavaClassLoader, as in, this type has a custom Java class loader?

DougGregor commented 1 week ago

@lhoward anything else you want to do here before we merge?

lhoward commented 1 week ago

@lhoward anything else you want to do here before we merge?

I'm happy for you to merge, unless you want tests (which I am still working on).

DougGregor commented 1 week ago

I do like tests. Let's wait until you have some tests in place.

lhoward commented 1 week ago

I'm a bit caught up with other stuff today, I'll endeavour to get onto tests next week, feel free to merge (or not) in the interim.

DougGregor commented 1 week ago

Since this is also needed in the other PR, I'll go ahead and merge.