Help with compiler error: method in class X cannot be applied to class Y

  • Thread starter Petterson Mikael
  • Start date
P

Petterson Mikael

Hi,

I am trying to compile my app but get the following error:

BoamManagedObject.java:412:
addProxyObserver(se.company.subsys.app.boam.fpx.proxies.ProxyObserver)
in se.company.subsys.app.boam.fpx.proxies.BoamProxy cannot be applied to
(se.company.subsys.app.boam.mao.bcm.BoamManagedObject)
[javac] myProxies.addProxyObserver(this);


Any hints about what this problem could be related to?

Regards,

//Mikael
 
G

Gordon Beaton

Hi,

I am trying to compile my app but get the following error:

BoamManagedObject.java:412:
addProxyObserver(se.company.subsys.app.boam.fpx.proxies.ProxyObserver)
in se.company.subsys.app.boam.fpx.proxies.BoamProxy cannot be applied to
(se.company.subsys.app.boam.mao.bcm.BoamManagedObject)
[javac] myProxies.addProxyObserver(this);


Any hints about what this problem could be related to?


The error message tells you exactly what the problem is.

You attempt to invoke BoamProxy.addProxyObserver(this) from within
your BoamManagedObject class, but you need to pass a ProxyObserver to
the method. It is apparent that BoamManagedObject isn't a
ProxyObserver.

If ProxyObserver is an interface, BoamManagedObject needs to implement
it. If it's a class, BoamManagedObject needs to extend it. Or maybe
you've simply used the wrong argument.

/gordon
 
P

Paul Lutus

Petterson said:
Hi,

I am trying to compile my app but get the following error:

BoamManagedObject.java:412:
addProxyObserver(se.company.subsys.app.boam.fpx.proxies.ProxyObserver)
in se.company.subsys.app.boam.fpx.proxies.BoamProxy cannot be applied to
(se.company.subsys.app.boam.mao.bcm.BoamManagedObject)
[javac] myProxies.addProxyObserver(this);


Any hints about what this problem could be related to?


I know exactly what this error message is related to -- it is related to
your code, which you did not post. And don't post all of it, just the
relevant few lines that created this error message.

Then someone here will point out your error, instead of guessing about it.
 
N

Neal Gafter

Yes, the type se.company.subsys.app.boam.mao.bcm.BoamManagedObject is not a
subtype of se.company.subsys.app.boam.fpx.proxies.ProxyObserver.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top