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


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

Re: Design Patterns

Path csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From markspace <markspace@nospam.nospam>
Newsgroups comp.lang.java.programmer
Subject Re: Design Patterns
Date Tue, 05 Feb 2013 14:30:58 -0800
Organization A noiseless patient Spider
Lines 47
Message-ID <kes16c$l9e$1@dont-email.me> (permalink)
References <3c0d69c3-591d-4d99-8c13-30a0fd1684b3@googlegroups.com> <68pyk4ua9x9m.1nm4lckdwgp86.dlg@40tude.net> <singleton-20130204174059@ram.dialup.fu-berlin.de> <51106eff$0$293$14726298@news.sunsite.dk> <singleton-20130205050434@ram.dialup.fu-berlin.de> <1g6plnhx9njxt$.bx5mrpbwc6mi$.dlg@40tude.net> <m4qdnYiC9pPVSY3MnZ2dnUVZ8jSdnZ2d@bt.com> <kerv5k$90n$1@dont-email.me> <static-class-20130205230502@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Tue, 5 Feb 2013 22:30:36 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="fba3415ba68d85d643935af2f52f0b4b"; logging-data="21806"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ZaJ4DwdyZlMx/apdRcAvhn+DtGVzYAH4="
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
In-Reply-To <static-class-20130205230502@ram.dialup.fu-berlin.de>
Cancel-Lock sha1:mj03Aq+qaT6CVLigWo1bk97jMck=
Xref csiph.com comp.lang.java.programmer:22133

Show key headers only | View raw


On 2/5/2013 2:06 PM, Stefan Ram wrote:
> markspace <markspace@nospam.nospam> writes:
>> A real static class is a nested class
>
>> that has
>
>    whose instances have
>
>> no (implied) reference to
>
>> its enclosing instance.
>
>    their enclosing instances.
>
>    BTW: A static class has a reference to its enclosing class.


"Class object."  It's splitting hairs a bit, but that is how the JLS 
refers to them.

Example:

"In the Java virtual machine, every object belongs to some particular 
class: the class that was mentioned in the creation expression that 
produced the object (§15.9), or the class whose Class object was used to 
invoke a reflective method to produce the object..."

<http://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.12.6>


>
> public class Main
> { static class C {}
>    public static void main( final java.lang.String args[] )
>    { java.lang.System.out.println( C.class.getEnclosingClass() ); }}
>

C.class is a class object.  "Class" as I use it above (usually with a 
lower case 'c') is more the concept of a class, rather than its Java 
implementation of the class.  (Rather the same way that the JLS uses 
'class' to refer to the general concept of a class in OOD, for example 
that section of the JLS I quoted above.)

That said, you're not really wrong to point out it's really the 
instances that have references to their enclosing class.

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


Thread

Design Patterns dougmmika@gmail.com - 2013-02-02 16:17 -0800
  Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-02 19:39 -0500
    Re: Design Patterns Marcel Müller <news.5.maazl@spamgourmet.org> - 2013-02-03 18:52 +0100
      Re: Design Patterns Lew <lewbloch@gmail.com> - 2013-02-03 14:23 -0800
      Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-08 23:57 -0500
        Re: Design Patterns Lew <lewbloch@gmail.com> - 2013-02-09 11:10 -0800
          Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-09 19:36 -0500
            Re: Design Patterns Lew <lewbloch@gmail.com> - 2013-02-09 23:44 -0800
              Re: Design Patterns Lew <lewbloch@gmail.com> - 2013-02-09 23:47 -0800
                Re: Design Patterns "John B. Matthews" <nospam@nospam.invalid> - 2013-02-10 12:28 -0500
              Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-10 13:35 -0500
              Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-10 13:36 -0500
                Re: Design Patterns Lew <lewbloch@gmail.com> - 2013-02-10 23:12 -0800
          Re: Design Patterns "John B. Matthews" <nospam@nospam.invalid> - 2013-02-09 19:45 -0500
  Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-02 20:17 -0500
  Re: Design Patterns Doug Mika <dougmmika@gmail.com> - 2013-02-02 19:43 -0800
    Re: Design Patterns markspace <markspace@nospam.nospam> - 2013-02-02 20:54 -0800
      Re: Design Patterns Doug Mika <dougmmika@gmail.com> - 2013-02-02 21:11 -0800
        Re: Design Patterns markspace <markspace@nospam.nospam> - 2013-02-03 08:24 -0800
          Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-08 23:41 -0500
    Re: Design Patterns Lew <lewbloch@gmail.com> - 2013-02-02 21:57 -0800
  Re: Design Patterns Roedy Green <see_website@mindprod.com.invalid> - 2013-02-03 06:38 -0800
  Re: Design Patterns Joerg Meier <joergmmeier@arcor.de> - 2013-02-04 17:06 +0100
    Re: Design Patterns Lew <lewbloch@gmail.com> - 2013-02-04 12:38 -0800
    Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-04 21:31 -0500
      Re: Design Patterns Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-02-04 21:03 -0800
        Re: Design Patterns Lew <lewbloch@gmail.com> - 2013-02-04 21:25 -0800
          Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-05 19:54 -0500
            Re: Design Patterns Lew <lewbloch@gmail.com> - 2013-02-05 17:51 -0800
              Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-05 20:54 -0500
        Re: Design Patterns lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-02-05 09:43 +0000
          Re: Design Patterns Lew <lewbloch@gmail.com> - 2013-02-05 13:03 -0800
            Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-05 20:09 -0500
          Re: Design Patterns markspace <markspace@nospam.nospam> - 2013-02-05 13:56 -0800
            Re: Design Patterns markspace <markspace@nospam.nospam> - 2013-02-05 14:30 -0800
            Re: Design Patterns Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-02-05 14:33 -0800
            Re: Design Patterns lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-02-06 09:03 +0000
          Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-05 20:07 -0500
      Re: Design Patterns Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-02-05 09:10 -0500
        Re: Design Patterns Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-02-05 13:20 -0500
          Re: Design Patterns Lew <lewbloch@gmail.com> - 2013-02-05 13:10 -0800
          Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-05 20:11 -0500
      Re: Design Patterns Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-02-05 09:53 -0800
        Re: Design Patterns Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-02-05 20:17 -0400
        Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-05 19:50 -0500
      Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-05 20:34 -0500
        Re: Design Patterns Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-02-06 08:40 -0800
          Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-08 23:38 -0500
    Re: Design Patterns Arne Vajhøj <arne@vajhoej.dk> - 2013-02-04 21:41 -0500

csiph-web