Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Interface signatures checking at compile-time?

Thank you, will try that :)

- Horst

Ron Bodkin wrote:
> I'd suggest you look at the withincode pointcut designator and about method
> signatures.
> 
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Horst Gutmann
> Sent: Monday, July 16, 2007 6:38 AM
> To: aspectj-users@xxxxxxxxxxx
> Subject: [aspectj-users] Interface signatures checking at compile-time?
> 
> Hi :)
> 
> Probably quite a beginner question (I'm a beginner when it comes to
> AspectJ), but I couldn't find any reference to it in the docs and
> perhaps I'm just really missing some basic concepts behind AspectJ. Is
> it somehow possible to check the signatures of all methods defined
> within an interface at compile-time and throw a compiler-warning if some
> constraints (return type, argument types) are not satisfied? (This is a
> homework for a course I'm attending, so I primarily need a pointer and
> less a full-fetched solution :))
> 
> So far I was thinking in this direction:
> 
> ::
> 	abstract aspect SignatureChecker<I> {
> 		declare warning: callToHandle(): "Constraints not
> satisfied";
> 		public pointcut callToHandle(): within(I) .....
> 	}
> 
> With I being the signature to be checked (bound to it using a concrete
> class extending this one). My problem is now, that I have no idea, how
> to actually check the signatures since args(..) is limited to run-time,
> isn't it?
> 
> Best regards,
> Horst Gutmann



Back to the top