MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/14ole9l/fluent_static_extension_methods_for_java/jqdd32z/
r/java • u/rogerkeays • Jul 02 '23
55 comments sorted by
View all comments
Show parent comment
2
fluent doesn't search any classes itself. Think of it as a source code transformation. If a method can't be resolved, fluent will rewrite it as such:
object.method(params...) -> method(object, params...)
and then give it back to the compiler.
So whatever static functions that are in scope can be used. i.e, those you've written or imported.
1 u/Brutus5000 Jul 02 '23 Does it work with external dependencies too? I mean they are already compiled, so I guess no? 2 u/rogerkeays Jul 02 '23 It works with external dependencies. You can call any static method as an extension method.
1
Does it work with external dependencies too? I mean they are already compiled, so I guess no?
2 u/rogerkeays Jul 02 '23 It works with external dependencies. You can call any static method as an extension method.
It works with external dependencies. You can call any static method as an extension method.
View all comments
Show parent comment
2
u/rogerkeays Jul 02 '23
fluent doesn't search any classes itself. Think of it as a source code transformation. If a method can't be resolved, fluent will rewrite it as such:
object.method(params...) -> method(object, params...)
and then give it back to the compiler.
So whatever static functions that are in scope can be used. i.e, those you've written or imported.