Bug 293509

Summary: Allow the use of not-fully-qualified types in @AspectJ
Product: [Tools] AspectJ Reporter: Ramnivas Laddad <ramnivas>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: aclement
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ramnivas Laddad CLA 2009-10-27 16:38:45 EDT
The @AspectJ syntax requires that pointcuts specify fully-qualified names since  import statements aren't retained in byte code. However, this causes long, difficult to read pointcuts. It will be nice if AspectJ can provide an alternative "import" model similar to shown below:

@Aspect
@Import({"org.springframework.transaction", "com.springsource.insight"})
public class MyAspect {
    // PlatformTransactionManager and TransactionStatus resolved against 
    // packages in @Import 
    @Poitncut("execution(* PlatformTransactionManager.*(TransactionStatus))")
    public void tx() {}

    ...
}

See http://jira.springframework.org/browse/SPR-5992 for a Spring issue, which will also benefit from this enhancement.
Comment 1 Andrew Clement CLA 2009-10-27 16:46:13 EDT
partially discussed already as bug 126560