[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] generic return method in aspcet J
|
Ok, I have no error when I remove all methods form the interface
AssociationSource.
Also it' ok if I keep the setTarget method in the interface.
I have a probleme with the getTarget method.
I have another problem with this error:
incompatible return type applying to method-execution(java.util.List
BranchImpl.getRevisions())
The code is below.
I can't add an advise on method which the return type is a generic type
Thanks.
Stéphane.
The code :
public interface Revision {
}
public interface Branch {
public List<Revision> getRevisions();
}
public class BranchImpl implements Branch {
public List<Revision> getRevisions() {
return null;
}
private List<Revision> getRevisionsIMPL() {
return null;
}
}
public aspect Core {
//Branch.getRevisions
List<Revision> around (BranchImpl instance)
: target(instance) && args() && execution ( public List<Revision>
BranchImpl.getRevisions())
{
List<Revision> ret = new ArrayList<Revision>;
// some codes...
return ret ;
}
//Branch.getRevisions
List<Revision> around (BranchImpl instance)
: target(instance) && args() && execution ( private List<Revision>
BranchImpl.getRevisionsIMPL())
{
List<Revision> ret = new ArrayList<Revision>;
// some codes...
return ret ;
}
}
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature