Summary: | Support type patterns for AspectJ | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Ron Bodkin <rbodkin+LISTS> |
Component: | Compiler | Assignee: | Adrian Colyer <adrian.colyer> |
Status: | REOPENED --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 | CC: | aclement, Ben.Youngdahl, matthew |
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Ron Bodkin
2004-05-20 15:55:17 EDT
Why limit such an addition to just type patterns? How about method, constructor, and field patterns as well? Looking at the AspectJ 1.1 quick reference I'm not seeing a mechanism to use OR-operators ( || ) for these patterns, but, why not? For example, if I need to define call() and execution() pointcuts across the same set of methods, its bad from a maintenance standpoint to have to copy the signatures multiple times. For example: pointcut fooCalls() : call(... method signature 1 ...) || call ( ... method signature 2 ... ) || etc.; pointcut fooExecutions() : call(... method signature 1 ...) || call ( .. method signature 2 ... ) || etc.; Why not support a way to define a set of method signatures, attach a name to it, and then do: pointcut fooCalls() : call(fooMethods); pointcut fooExecutions() : execution(fooMethods); Thanks for your consideration of this opinion. We're not going to get to this in AJ 1.5.0. Marking as "LATER" for consideration in 1.5.1 and future release planning. Something like this *should* make it into AJ sooner rather than later though I hope. LATER/REMIND bugs are being automatically reopened as P5 because the LATER and REMIND resolutions are deprecated. Any change in status for this? I'd still like to be able to prevent inheritance within certain packages or types, especially as I use traits more & more: public abstract aspect AbstractExtend { public static class Nothing {} /** * Type expression provided by subaspects to identify types that are not * allowed to use inheritance. */ public abstract type restrictedTypes; public type requiredInheritance: Enum+ && Annotation+; declare parents: (restrictedTypes && !requiredInheritance) extends Nothing; } no change I'm afraid, I'm heads down in JDT Core Java 8 right now. |