I realize that Java doesn't literally allow you to pass functions as arguments. And I've seen threads that address this topic with regular members, but I can't seem to adapt it for static methods.
I have two classes that act kind of like two different "datasources" (A and B). They each have a static method that amounts to "getData" that returns an array of strings. I have no need to instantiate these classes -- that would only complicate things since they need to be accessed universally. Their interfaces are all static members.
Now I have another class (C) that needs to use this data, and C IS instantiated. I don't want to just send the data once, which would represent a static transaction, I want to send the data source object itself (ie A and B) so the data can always be fresh when the getData() method is used inside C.
I imagine I need to create some kind of superclass for A and B and pass that around. But this static method deal is really tripping me up. Any ideas of how I can modify this system?