(again) Eclipse doesn't recognize introduced method [message #59305] |
Wed, 14 December 2005 20:56 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: ad-rocha.uol.com.br
Hi,
I'm posting this message again, because there was no replies...
I'm using intertype declarations in order to make my classes implement a
interface:
package br.com.example.aspectos;
public aspect Persistencia {
declare parents: br.com.example.model.* implements Persistente;
private int Persistente.chave = 0;
public int Persistente.getChave() {
return chave;
}
public void Persistente.setChave(int chave) {
this.chave = chave;
}
}
package br.com.example.aspectos;
public interface Persistente {
public int getChave();
public void setChave(int chave);
}
The compilation works fine, and I can see the method getChave() if I
decompile the "br.com.example.model.Pessoa" class. But when I try to use
this method, eclipse bombs with message: "The method getChave() is undefined
for classe Pessoa".
My current configuration is:
Eclipse Java Development Tools SDK
Version: 3.1.0
Build id: I20050627-1435
Eclipse AspectJ Development Tools
Version: 1.3.0
Build id: 20051208103628
AspectJ version: 1.5.0.20051206103951
What am I doing wrong?
Thanks,
Andr
|
|
|
Re: (again) Eclipse doesn't recognize introduced method [message #59411 is a reply to message #59305] |
Thu, 15 December 2005 09:04 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Matt Chapman![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=mpchapman%40gmail.com) Messages: 429 Registered: July 2009 |
Senior Member |
|
|
Hi André,
In what way does Eclipse bomb exactly? Is it just underlined in red in the
editor? If so, then that is because the class calling that method is open
in the Java editor, which isn't aware of the aspect providing the method.
Try opening the class in the AspectJ editor instead.
Regards,
Matt.
André Dantas Rocha wrote:
> Hi,
> I'm posting this message again, because there was no replies...
> I'm using intertype declarations in order to make my classes implement a
> interface:
> package br.com.example.aspectos;
> public aspect Persistencia {
> declare parents: br.com.example.model.* implements Persistente;
> private int Persistente.chave = 0;
> public int Persistente.getChave() {
> return chave;
> }
> public void Persistente.setChave(int chave) {
> this.chave = chave;
> }
> }
> package br.com.example.aspectos;
> public interface Persistente {
> public int getChave();
> public void setChave(int chave);
> }
> The compilation works fine, and I can see the method getChave() if I
> decompile the "br.com.example.model.Pessoa" class. But when I try to use
> this method, eclipse bombs with message: "The method getChave() is undefined
> for classe Pessoa".
> My current configuration is:
> Eclipse Java Development Tools SDK
> Version: 3.1.0
> Build id: I20050627-1435
> Eclipse AspectJ Development Tools
> Version: 1.3.0
> Build id: 20051208103628
> AspectJ version: 1.5.0.20051206103951
> What am I doing wrong?
> Thanks,
> André
|
|
|
|
Re: (again) Eclipse doesn't recognize introduced method [message #591279 is a reply to message #59305] |
Thu, 15 December 2005 09:04 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Matt Chapman![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=mpchapman%40gmail.com) Messages: 429 Registered: July 2009 |
Senior Member |
|
|
Hi André,
In what way does Eclipse bomb exactly? Is it just underlined in red in the
editor? If so, then that is because the class calling that method is open
in the Java editor, which isn't aware of the aspect providing the method.
Try opening the class in the AspectJ editor instead.
Regards,
Matt.
André Dantas Rocha wrote:
> Hi,
> I'm posting this message again, because there was no replies...
> I'm using intertype declarations in order to make my classes implement a
> interface:
> package br.com.example.aspectos;
> public aspect Persistencia {
> declare parents: br.com.example.model.* implements Persistente;
> private int Persistente.chave = 0;
> public int Persistente.getChave() {
> return chave;
> }
> public void Persistente.setChave(int chave) {
> this.chave = chave;
> }
> }
> package br.com.example.aspectos;
> public interface Persistente {
> public int getChave();
> public void setChave(int chave);
> }
> The compilation works fine, and I can see the method getChave() if I
> decompile the "br.com.example.model.Pessoa" class. But when I try to use
> this method, eclipse bombs with message: "The method getChave() is undefined
> for classe Pessoa".
> My current configuration is:
> Eclipse Java Development Tools SDK
> Version: 3.1.0
> Build id: I20050627-1435
> Eclipse AspectJ Development Tools
> Version: 1.3.0
> Build id: 20051208103628
> AspectJ version: 1.5.0.20051206103951
> What am I doing wrong?
> Thanks,
> André
|
|
|
|
Powered by
FUDForum. Page generated in 0.03811 seconds