Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #23818

Re: cannot find symbol?

Date 2013-05-04 09:16 +0100
From lipska the kat <"nospam at neversurrender dot co dot uk">
Organization Trollbusters 3
Newsgroups comp.lang.java.programmer
Subject Re: cannot find symbol?
References <km2178$3h2$1@speranza.aioe.org>
Message-ID <cPqdnfwaQtFxXhnMnZ2dnUVZ8radnZ2d@bt.com> (permalink)

Show all headers | View raw


On 04/05/13 05:01, qwertmonkey@syberianoutpost.ru wrote:
>   Basically I am passing a String array to a method (verify) defined in a
>   generic way in an interface in order to create an object of a certain type
>
>   I am checking that the object of the correct type is created but when I try
> to call a method java tells me "cannot find symbol"
>
>   I squinted at it for a while, but can't see what is wrong with it
>
>   What is wrong with this code? How do you fix that problem? Does it relate
> to the use of generic declarations and/or reflection?

Firstly, looking at this code gave me a headache :-(

Secondly

There is no reflection so the import statements

import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;

are not required

Thirdly

change

tCtxt.setCtxt((new Integer(aSAr[0])).intValue(), aSAr[1],
(new Long(aSAr[0])).longValue());

to

((IADObj) tCtxt).setCtxt((new Integer(aSAr[0])).intValue(), aSAr[1], 
(new Long(aSAr[0])).longValue());

and the code will compile and run although it really should be 
re-written as is is *horrible* for reasons explained elsewhere in this 
thread.

lipska

-- 
Lipska the Kat©: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

cannot find symbol? qwertmonkey@syberianoutpost.ru - 2013-05-04 04:01 +0000
  Re: cannot find symbol? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-05-03 21:54 -0700
  Re: cannot find symbol? lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-05-04 09:16 +0100
    Re: cannot find symbol? Joerg Meier <joergmmeier@arcor.de> - 2013-05-04 14:49 +0200
      Re: cannot find symbol? Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-05-04 09:14 -0400
        Re: cannot find symbol? Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-05-06 05:42 -0300
      Re: cannot find symbol? Arne Vajhøj <arne@vajhoej.dk> - 2013-05-04 21:31 -0400
        Re: cannot find symbol? markspace <markspace@nospam.nospam> - 2013-05-04 18:34 -0700
      Re: cannot find symbol? Robert Klemme <shortcutter@googlemail.com> - 2013-05-05 13:09 +0200

csiph-web