[Apologies to the moderator(s) for trying to post this via email with the wrong address. ]
I have Moose 6.0 and I've used jdt2famix 1.0.2 to generate an MSE file. I'm trying to use Moose to reason about clients of Java interfaces. I would like to find any classes that depend on an interface by any means. I thought using clientTypes was the right thing, except it doesn't work the way I expect in a simple case.
For the interface in my example, clientTypes only returns the class that is an implementation of the interface (which makes sense, as they depend on it) but not the client class that uses it via a private static reference (which, to me, doesn't make sense).
For more information, I am able find the client of the interface via structuresWithDeclaredType, so I'm pretty sure it's not information missing in the MSE file (not a jdt2famix bug).
Based on the simple example below, shouldn't clientTypes for ITest return ClassAClient and ConcreteImplementationA rather than just ConcreteImplementationA?
// ITest.java public interface ITest {
}
// ConcreteImplementationA.java public class ConcreteImplementationA implements ITest {
}
// ClassAClient.java public class ClassAClient { private static ITest theTest; public static void main(String arg[]) { theTest = new ConcreteImplementationA(); } }
-- View this message in context: http://forum.world.st/Java-interfaces-and-clientTypes-tp4915115.html Sent from the Moose mailing list archive at Nabble.com.