Hi, Ahmed. Generally you need to have control over either the caller of the method or the method itself. Int he former case you can use a call pointcut, in the latter an execution pointcut. If you have control over neither caller nor callee, AspectJ can do nothing for you. It's not magic, even if it sometimes looks that way ;-)
Eric On 06/02/2008, Ahmed Hashim <[EMAIL PROTECTED]> wrote: > > Hi All, > I have a problem with JAXB parser, the parser fail to validate the root > element. > The implementation class XMLNSDocumentScannerImpl contains a method reset() > which will set the variable fBindNamespaces to false. Then the method > scanStartElement() will not validate the XML namespace. > > Can I use AspectJ to intercept the calling to the method scanStartElement() > and call reset() before that? > > I did a pointcut to catch the method call, but the method is being called > from the parser, not from my application, so compile time weaving will not > take effect. > > is my solution valid? > > Regards, > Hashim > > -- > View this message in context: > http://www.nabble.com/Use-AspectJ-to-intercept-JAXB-parse-tp15312667p15312667.html > Sent from the AspectJ - users mailing list archive at Nabble.com. > > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > -- Eric Bodden Sable Research Group McGill University, Montréal, Canada _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
