Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Target type wildcard and variable binding

I am trying to write a pointcut for a method call on a target of java.awt.Component and all subclasses of Component. In the advice I need to interrogate the Component. However, I get warnings that the target type is not the correct type. Is it possible to accomplish this?
 
Troy T. Collinsworth
 
     [iajc]     see also: C:\view\...\AbstractMediator.java:193
     [iajc] C:\view\...\AbstractMediator.java:297 [warning] does not match because declaring type is javax.swing.JComponent, if match desired use target(javax.swing.JList) [Xlint:unmatchedSuperTypeInCall]
 
 
public abstract class AbstractMediator ...
 public void register( String name, JComponent comp ) {
  comp.setName( name );    //line 193
  ....
 
 
    before(Component comp) : (call (* javax.swing.JList.set*(..))) && target(comp) {
        AnalysisHelper.check(comp);
     }
 


The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution, or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to the
message and deleting it from your computer.

Thank you. Paychex, Inc.


Back to the top