> What happens if you insert an inner class named `$anon$1' there? It compiles fine. However, as I said, the problem may be my pointcut is not driving the necessary analysis. Are you able to tell me what pointcuts you are using to trigger the failure?
Based on your note and that bug report, there is a problem that AspectJ is a bit dumb about looking for the outer class and if you use names containing dollars (which are valid), it needs to be smarter. What I'm after here is a demo piece of java code that surfaces the dumbness so I can apply the patch and fix it. As the patch in the bug suggests, there are attributes around in the class file that give you proper information about inner classes, and they could be used to make the weaver do the right thing. When I have time, I will work on the pointcut that surfaces the failure, but I'm a bit snowed under right now to look at exploring the possible variations - hence if you have a particular pointcut that already causes the problem, that would be very helpful. cheers Andy 2009/10/7 Philip Köster <[email protected]>: > Andy Clement wrote: > >> If you can build a simple testcase that shows the problem (which ought >> to be possible without using scalac as it is just a naming problem), I >> will work to put the patch from the bug in. > > I'm not sure if this is really only a naming problem. Currently, for a class > name like `Outer$$anon$1', the weaver will look for an outer class named > `Outer$$anon', which is straight-forward and perfectly sensible from the > weaver's point of view. > > I'd need more knowledge about the Scala-generated bytecode here---my > suspection is that there is no inner class named `anon' but that the name of > the inner class is actually `$anon$1', hence `Outer' would be the next > possible outer class. > >>> Outer.java >> >> public class Outer { >> public class Inner$1 { >> } >> public class Inner$$$1$$2 { >> } >> } > > What happens if you insert an inner class named `$anon$1' there? > > ---Ph. > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
