Hello Andy I'll try to give a full example after my vacation... ;-)
Best regards, James 2011/11/3 Andy Clement <[email protected]> > Hi, > > I had a little trouble with your program as the types aren't quite > complete: > > > public abstract class AbstractBaseRepository<T> { > > Iterable<T> findAll(); > > } > > findAll needs to be abstract there I presume? I then had to implement > it in FooRepository to keep things happy: > > public Iterable<Foo> findAll() { > return null; > } > > As soon as I added this method I found the pointcut matched on it. > > Can you maybe give me a complete project that exhibits the problem? > > > I now want to match calls to findAll of IFooRepository and use this > > expression: > > execution(* com.example.IFooRepository.findAll(..)) > > Do you mean you want to match calls? or do you mean you want to match that > method executing? That is an execution() pointcut. If you really wanted > to > match calls you'd use call(). > > Anyway, as I say, seeing a complete example that doesn't work would help > me. > > Are you in AJDT with those types? did you try a full clean build, did that > make > a difference? > > When i track the join point signatures used for matching, I see this: > > actual joinpoint: java.lang.Iterable com.example.FooRepository.findAll() > computed joinpoint signatures for that joinpoint: > java.lang.Iterable com.example.FooRepository.findAll() > java.lang.Iterable<com.example.Foo> com.example.IFooRepository.findAll() > > The second one matches so we stop immediately. > > cheers > Andy > > On 3 November 2011 06:47, Jean-Pierre Bergamin <[email protected]> > wrote: > > Hello everyone > > I'm fighting with spring security and aspectj joinpoints and have no idea > > why our joinpoint declaration does not match. > > We have the following class and interface structure: > > 8<----------------------------- > > public interface ILookupRepository<T> { > > Iterable<T> findAll(); > > } > > public interface IBaseRepository<T> extends ILookupRepository<T> { } > > public abstract class AbstractBaseRepository<T> { > > Iterable<T> findAll(); > > } > > public interface IFooRepository extends IBaseRepository<Foo> { } > > public class FooRepository extends AbstractBaseRepository<Foo> implements > > IFooRepository { } > > 8<----------------------------- > > I now want to match calls to findAll of IFooRepository and use this > > expression: > > execution(* com.example.IFooRepository.findAll(..)) > > This pattern does not match when calling > > IFooRepository repo = ... > > repo.findAll(); > > The signatures that are found and compared against in > > SignaturePattern.matches are the following: > > Iterable > > > net.junisphere.eranger.domain.internal.neo4j.repositories.AbstractBaseRepository.findAll() > > Iterable<IBaseEntity> com.example.IBaseRepository<IBaseEntity>.findAll() > > Iterable<IBaseEntity> > com.example.ILookupRepository<IBaseEntity>.findAll() > > Iterable com.example.ILookupRepository<IBaseEntity>.findAll() > > Iterable<net.junisphere.eranger.domain.model.IBaseEntity> > > com.example.ILookupRepository<IBaseEntity>.findAll() > > Iterable com.example.ILookupRepository<IBaseEntity>.findAll() > > > > Any ideas why the IFooRepository is not taken into account, but only > > IBaseRepository and ILookupRepository? > > > > Best regards, > > James > > _______________________________________________ > > 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 >
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
