Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > called method "cannot be applied to" method in a command object usinggenerics ...

Reply
Thread Tools

called method "cannot be applied to" method in a command object usinggenerics ...

 
 
lbrtchx@gmail.com
Guest
Posts: n/a
 
      05-07-2008
Well, I don't really understand why this is happening, I am still
learning java generics. But, basically I have a command object with a
generic method that is encapsulated in a "has a" fashion by a
containing object

When you call the containing's object's method, it includes extra
parameters it knows about and relays the call to the command object. I
know there is no problem with the method itself since it works fine
when called from the containing's object. It stops compiling however
when you put the method in the command object

SelWhr08.java:182:
<KOTp>getGnRx(java.sql.PreparedStatement,KITp,in t[],int[],java.lang.Class<KOTp>)
in Kmnd02 cannot be applied to
(java.sql.PreparedStatement,KITp,int[],int[],java.lang.Class<KOTp>)
KOTp[] TpAr = Kmnd.getGnRx(PSt, IObj, iITpIxAr, iOTpIxAr, KO);

What is going on here? What part of generics should I get more
acquainted with?

How can I fix it?

Thanks
lbrtchx
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is a button Click event also called when a textbox TextChanged event is called??? S_K ASP .Net 6 11-08-2007 07:44 PM
What is called carry chain structure in FPGA is called in IC? Weng Tianxiang VHDL 6 09-12-2007 07:19 AM
[compilation error] debugging this error message "Object() in java.lang.Object cannot be applied to" Gavin Java 3 03-28-2007 05:57 AM
three times copy ctor called, one ctor called, why? Apricot C++ 4 04-16-2004 07:55 AM
Help with compiler error: method in class X cannot be applied to class Y Petterson Mikael Java 3 10-08-2003 02:13 PM



Advertisments