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


Groups > comp.lang.java.programmer > #23819 > unrolled thread

cannot find symbol?

Started byqwertmonkey@syberianoutpost.ru
First post2013-05-04 10:50 +0000
Last post2013-05-04 05:43 -0700
Articles 2 — 2 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  cannot find symbol? qwertmonkey@syberianoutpost.ru - 2013-05-04 10:50 +0000
    Re: cannot find symbol? markspace <markspace@nospam.nospam> - 2013-05-04 05:43 -0700

#23819 — cannot find symbol?

Fromqwertmonkey@syberianoutpost.ru
Date2013-05-04 10:50 +0000
Subjectcannot find symbol?
Message-ID<km2p5v$r5j$1@speranza.aioe.org>
> Try reducing your problem to an SSCCE <http://sscce.org> ...
~ 
 Sorry! The thing is that I wasn't sure what was causing the problem and I did
attempt to reduce that code to an SSCCE.
~ 
 The original code is based on reflection
~ 
> This looks like it was copied from C++ code which was copied from C code.
~ 
 You would make a good detective ;-)
~ 
> ((IADObj) tCtxt).setCtxt((new Integer(aSAr[0])).intValue(), aSAr[1], (new Long(aSAr[0])).longValue());
~ 
 The whole purpose of doing things this way is not using a cast within verifyCtxt,
where using the strategy pattern an object of a certain class (which is given via
input parameter (.verifyCtxt(aSAr, _.getClass()))) is created
~ 
 I am trying to do everything within DTO_T_Ctxt06 through templates, so, users 
don't have to code this class and for reasons I still don't get I am not able 
to get this right
~ 
 Say, a user goes:

// __ 
class Ho3K{
 private String aS;
 Ho3K(){}
 public void setCtxt(String aS){ this.aS = aS; }
 public String toString(){ return(" aS: |" + aS + "|"); }
}
~ 
 ...
 Ho3K Ho3 = new Ho3K();

 aSAr =  new String[]{"ho, ho, ho!"};

 DTO_T_Ctxt06<Ho3K> Ho3Ctxt = new DTO_T_Ctxt06<Ho3K>();

 Ho3Ctxt.verifyCtxt(aSAr, Ho3.getClass());
 System.err.println("// __ Ho3.getCtxtDTO() : |" + Ho3.getCtxtDTO() + "|");
~ 
 How do you do such a thing?
~ 
 lbrtchx

[toc] | [next] | [standalone]


#23820

Frommarkspace <markspace@nospam.nospam>
Date2013-05-04 05:43 -0700
Message-ID<km2viq$cpr$1@dont-email.me>
In reply to#23819
On 5/4/2013 3:50 AM, qwertmonkey@syberianoutpost.ru wrote:
> class Ho3K{
>   private String aS;
>   Ho3K(){}
>   public void setCtxt(String aS){ this.aS = aS; }
>   public String toString(){ return(" aS: |" + aS + "|"); }

>   System.err.println("// __ Ho3.getCtxtDTO() : |" + Ho3.getCtxtDTO() + "|");

>   How do you do such a thing?

What is "such a thing?"  What are you even *trying* to do?  You can't 
call "getCtxtDTO" on an object that only defines the methods "setCtxt" 
and "toString".

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web