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

Discussion in 'Java' started by lbrtchx@gmail.com, May 7, 2008.

  1. Guest

    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,int[],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
     
    , May 7, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Petterson Mikael
    Replies:
    3
    Views:
    4,338
    Neal Gafter
    Oct 8, 2003
  2. Jan Danielsson
    Replies:
    2
    Views:
    10,433
    Jan Danielsson
    Jan 15, 2005
  3. HK
    Replies:
    1
    Views:
    378
    E.Otter
    Jul 14, 2005
  4. Darren
    Replies:
    11
    Views:
    4,603
    Darren
    Oct 27, 2005
  5. Gavin
    Replies:
    3
    Views:
    508
    Chris Uppal
    Mar 28, 2007
Loading...

Share This Page