Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: ArrayAdapter Date: Sat, 02 Apr 2011 10:48:53 -0400 Organization: albasani.net Lines: 21 Message-ID: References: <8vi26oFvh2U1@mid.individual.net> <8vnd6rF2qlU1@mid.individual.net> <8vnhhhFseeU1@mid.individual.net> <8vnmbrFq40U1@mid.individual.net> <8vonp8FvbaU4@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net oZVeFBt0ILBBfZcOvfssIvKs375BLKQkNy82BvPwy84GW6IJMYgtpVE7O4CkzjnU3bFLvCESC9xXBVL/X8JIPQ== NNTP-Posting-Date: Sat, 2 Apr 2011 14:48:51 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="ZObXmgzd2XE5ONjzu38BpxBQwHLmh20TYnD4c967di/peh+LWkdSZINKSnuWV0IPiBinDrUjM//fS/aMiVc9b/ujhuN0Qpi1xvvhjcrKrk2fcqcizwWA4pjiDjUYMkav"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 In-Reply-To: <8vonp8FvbaU4@mid.individual.net> Cancel-Lock: sha1:yPsnos4OlmRFlbvXKbHKWoT7Ne4= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2754 Dirk Bruere at NeoPax wrote: > Another problem - What does passing context to a class mean if every item and > method in it is static? In the example you showed it's passed to an instance, not a class. The purpose generally, though I cannot speak to the specific fragment here, of the idiom is to give the instance access to class-wide information. This is common in RMI, JNDI, EJBs (based on RMI), JPA, Spring, web apps and many, many other libraries. They maintain a static context (for application-wide information, session-wide and other scopes) in which instances can share information with each other. This is, in fact, the purpose of static members overall. Basic, fundamental Java concept. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg