Bug 293509 - Allow the use of not-fully-qualified types in @AspectJ
Summary: Allow the use of not-fully-qualified types in @AspectJ
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-27 16:38 EDT by Ramnivas Laddad CLA
Modified: 2009-10-27 16:46 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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