-
Notifications
You must be signed in to change notification settings - Fork 48
Generate JavaKitFunction module #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"classes" : { | ||
"java.util.function.BiConsumer" : "JavaBiConsumer", | ||
"java.util.function.BiFunction" : "JavaBiFunction", | ||
"java.util.function.BinaryOperator" : "JavaBinaryOperator", | ||
"java.util.function.BiPredicate" : "JavaBiPredicate", | ||
"java.util.function.BinaryOperator" : "JavaBinaryOperator", | ||
"java.util.function.BooleanSupplier" : "JavaBooleanSupplier", | ||
"java.util.function.Consumer" : "JavaConsumer", | ||
"java.util.function.DoubleBinaryOperator" : "JavaDoubleBinaryOperator", | ||
"java.util.function.DoubleConsumer" : "JavaDoubleConsumer", | ||
"java.util.function.DoubleFunction" : "JavaDoubleFunction", | ||
"java.util.function.DoublePredicate" : "JavaDoublePredicate", | ||
"java.util.function.DoubleSupplier" : "JavaDoubleSupplier", | ||
"java.util.function.DoubleToIntFunction" : "JavaDoubleToIntFunction", | ||
"java.util.function.DoubleToLongFunction" : "JavaDoubleToLongFunction", | ||
"java.util.function.DoubleUnaryOperator" : "JavaDoubleUnaryOperator", | ||
"java.util.function.Function" : "JavaFunction", | ||
"java.util.function.IntBinaryOperator" : "JavaIntBinaryOperator", | ||
"java.util.function.IntConsumer" : "JavaIntConsumer", | ||
"java.util.function.IntConsumer" : "JavaIntConsumer", | ||
"java.util.function.IntFunction" : "JavaIntFunction", | ||
"java.util.function.IntPredicate" : "JavaIntPredicate", | ||
"java.util.function.IntSupplier" : "JavaIntSupplier", | ||
"java.util.function.IntToDoubleFunction" : "JavaIntToDoubleFunction", | ||
"java.util.function.IntToLongFunction" : "JavaIntToLongFunction", | ||
"java.util.function.IntUnaryOperator" : "JavaIntUnaryOperator", | ||
"java.util.function.LongBinaryOperator" : "JavaLongBinaryOperator", | ||
"java.util.function.LongConsumer" : "JavaLongConsumer", | ||
"java.util.function.LongFunction" : "JavaLongFunction", | ||
"java.util.function.LongPredicate" : "JavaLongPredicate", | ||
"java.util.function.LongSupplier" : "JavaLongSupplier", | ||
"java.util.function.LongToDoubleFunction" : "JavaLongToDoubleFunction", | ||
"java.util.function.LongToIntFunction" : "JavaLongToIntFunction", | ||
"java.util.function.LongUnaryOperator" : "JavaLongUnaryOperator", | ||
"java.util.function.ObjDoubleConsumer" : "JavaObjDoubleConsumer", | ||
"java.util.function.ObjIntConsumer" : "JavaObjIntConsumer", | ||
"java.util.function.ObjLongConsumer" : "JavaObjLongConsumer", | ||
"java.util.function.Predicate" : "JavaPredicate", | ||
"java.util.function.Supplier" : "JavaSupplier", | ||
"java.util.function.ToDoubleBiFunction" : "JavaToDoubleBiFunction", | ||
"java.util.function.ToDoubleFunction" : "JavaToDoubleFunction", | ||
"java.util.function.ToIntBiFunction" : "JavaToIntBiFunction", | ||
"java.util.function.ToIntFunction" : "JavaToIntFunction", | ||
"java.util.function.ToLongBiFunction" : "JavaToLongBiFunction", | ||
"java.util.function.ToLongFunction" : "JavaToLongFunction", | ||
"java.util.function.UnaryOperator" : "JavaUnaryOperator" | ||
} | ||
} | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.BiConsumer") | ||
public struct JavaBiConsumer<T: AnyJavaObject, U: AnyJavaObject> { | ||
@JavaMethod | ||
public func accept(_ arg0: JavaObject?, _ arg1: JavaObject?) | ||
|
||
@JavaMethod | ||
public func andThen(_ arg0: JavaBiConsumer<JavaObject, JavaObject>?) -> JavaBiConsumer< | ||
JavaObject, JavaObject | ||
>? | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.BiFunction") | ||
public struct JavaBiFunction<T: AnyJavaObject, U: AnyJavaObject, R: AnyJavaObject> { | ||
@JavaMethod | ||
public func apply(_ arg0: JavaObject?, _ arg1: JavaObject?) -> JavaObject? | ||
|
||
@JavaMethod | ||
public func andThen(_ arg0: JavaFunction<JavaObject, JavaObject>?) -> JavaBiFunction< | ||
JavaObject, JavaObject, JavaObject | ||
>? | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.BiPredicate") | ||
public struct JavaBiPredicate<T: AnyJavaObject, U: AnyJavaObject> { | ||
@JavaMethod | ||
public func test(_ arg0: JavaObject?, _ arg1: JavaObject?) -> Bool | ||
|
||
@JavaMethod | ||
public func or(_ arg0: JavaBiPredicate<JavaObject, JavaObject>?) -> JavaBiPredicate< | ||
JavaObject, JavaObject | ||
>? | ||
|
||
@JavaMethod | ||
public func and(_ arg0: JavaBiPredicate<JavaObject, JavaObject>?) -> JavaBiPredicate< | ||
JavaObject, JavaObject | ||
>? | ||
|
||
@JavaMethod | ||
public func negate() -> JavaBiPredicate<JavaObject, JavaObject>? | ||
} |
16 changes: 16 additions & 0 deletions
16
Sources/JavaKitFunction/generated/JavaBinaryOperator.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface( | ||
"java.util.function.BinaryOperator", | ||
extends: JavaBiFunction<JavaObject, JavaObject, JavaObject>.self) | ||
public struct JavaBinaryOperator<T: AnyJavaObject> { | ||
@JavaMethod | ||
public func apply(_ arg0: JavaObject?, _ arg1: JavaObject?) -> JavaObject? | ||
|
||
@JavaMethod | ||
public func andThen(_ arg0: JavaFunction<JavaObject, JavaObject>?) -> JavaBiFunction< | ||
JavaObject, JavaObject, JavaObject | ||
>? | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.BooleanSupplier") | ||
public struct JavaBooleanSupplier { | ||
@JavaMethod | ||
public func getAsBoolean() -> Bool | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.Consumer") | ||
public struct JavaConsumer<T: AnyJavaObject> { | ||
@JavaMethod | ||
public func accept(_ arg0: JavaObject?) | ||
|
||
@JavaMethod | ||
public func andThen(_ arg0: JavaConsumer<JavaObject>?) -> JavaConsumer<JavaObject>? | ||
} |
9 changes: 9 additions & 0 deletions
9
Sources/JavaKitFunction/generated/JavaDoubleBinaryOperator.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.DoubleBinaryOperator") | ||
public struct JavaDoubleBinaryOperator { | ||
@JavaMethod | ||
public func applyAsDouble(_ arg0: Double, _ arg1: Double) -> Double | ||
} |
12 changes: 12 additions & 0 deletions
12
Sources/JavaKitFunction/generated/JavaDoubleConsumer.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.DoubleConsumer") | ||
public struct JavaDoubleConsumer { | ||
@JavaMethod | ||
public func accept(_ arg0: Double) | ||
|
||
@JavaMethod | ||
public func andThen(_ arg0: JavaDoubleConsumer?) -> JavaDoubleConsumer? | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.DoubleFunction") | ||
public struct JavaDoubleFunction<R: AnyJavaObject> { | ||
@JavaMethod | ||
public func apply(_ arg0: Double) -> JavaObject? | ||
} |
18 changes: 18 additions & 0 deletions
18
Sources/JavaKitFunction/generated/JavaDoublePredicate.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.DoublePredicate") | ||
public struct JavaDoublePredicate { | ||
@JavaMethod | ||
public func test(_ arg0: Double) -> Bool | ||
|
||
@JavaMethod | ||
public func or(_ arg0: JavaDoublePredicate?) -> JavaDoublePredicate? | ||
|
||
@JavaMethod | ||
public func and(_ arg0: JavaDoublePredicate?) -> JavaDoublePredicate? | ||
|
||
@JavaMethod | ||
public func negate() -> JavaDoublePredicate? | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.DoubleSupplier") | ||
public struct JavaDoubleSupplier { | ||
@JavaMethod | ||
public func getAsDouble() -> Double | ||
} |
9 changes: 9 additions & 0 deletions
9
Sources/JavaKitFunction/generated/JavaDoubleToIntFunction.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.DoubleToIntFunction") | ||
public struct JavaDoubleToIntFunction { | ||
@JavaMethod | ||
public func applyAsInt(_ arg0: Double) -> Int32 | ||
} |
9 changes: 9 additions & 0 deletions
9
Sources/JavaKitFunction/generated/JavaDoubleToLongFunction.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.DoubleToLongFunction") | ||
public struct JavaDoubleToLongFunction { | ||
@JavaMethod | ||
public func applyAsLong(_ arg0: Double) -> Int64 | ||
} |
19 changes: 19 additions & 0 deletions
19
Sources/JavaKitFunction/generated/JavaDoubleUnaryOperator.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.DoubleUnaryOperator") | ||
public struct JavaDoubleUnaryOperator { | ||
@JavaMethod | ||
public func applyAsDouble(_ arg0: Double) -> Double | ||
|
||
@JavaMethod | ||
public func compose(_ arg0: JavaDoubleUnaryOperator?) -> JavaDoubleUnaryOperator? | ||
|
||
@JavaMethod | ||
public func andThen(_ arg0: JavaDoubleUnaryOperator?) -> JavaDoubleUnaryOperator? | ||
} | ||
extension JavaClass<JavaDoubleUnaryOperator> { | ||
@JavaStaticMethod | ||
public func identity() -> JavaDoubleUnaryOperator? | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.Function") | ||
public struct JavaFunction<T: AnyJavaObject, R: AnyJavaObject> { | ||
@JavaMethod | ||
public func apply(_ arg0: JavaObject?) -> JavaObject? | ||
|
||
@JavaMethod | ||
public func compose(_ arg0: JavaFunction<JavaObject, JavaObject>?) -> JavaFunction< | ||
JavaObject, JavaObject | ||
>? | ||
|
||
@JavaMethod | ||
public func andThen(_ arg0: JavaFunction<JavaObject, JavaObject>?) -> JavaFunction< | ||
JavaObject, JavaObject | ||
>? | ||
} | ||
extension JavaClass { | ||
@JavaStaticMethod | ||
public func identity<T: AnyJavaObject, R: AnyJavaObject>() -> JavaFunction< | ||
JavaObject, JavaObject | ||
>? where ObjectType == JavaFunction<T, R> | ||
} |
9 changes: 9 additions & 0 deletions
9
Sources/JavaKitFunction/generated/JavaIntBinaryOperator.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.IntBinaryOperator") | ||
public struct JavaIntBinaryOperator { | ||
@JavaMethod | ||
public func applyAsInt(_ arg0: Int32, _ arg1: Int32) -> Int32 | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.IntConsumer") | ||
public struct JavaIntConsumer { | ||
@JavaMethod | ||
public func accept(_ arg0: Int32) | ||
|
||
@JavaMethod | ||
public func andThen(_ arg0: JavaIntConsumer?) -> JavaIntConsumer? | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Auto-generated by Java-to-Swift wrapper generator. | ||
import JavaKit | ||
import JavaRuntime | ||
|
||
@JavaInterface("java.util.function.IntFunction") | ||
public struct JavaIntFunction<R: AnyJavaObject> { | ||
@JavaMethod | ||
public func apply(_ arg0: Int32) -> JavaObject? | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a particular compelling example, but illustrates the module working.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, just at least some soundness check that it works at all 👍
I'd put it into a test file in this project and we're good them IMHO.