Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37451
| From | Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Are Outer Classes Loaded Lazily? |
| Date | 2017-09-22 23:46 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <oq4lev$j5j$1@dont-email.me> (permalink) |
| References | <opu86b$k29$1@news.albasani.net> <oq13am$9v4$1@gwaiyur.mb-net.net> <5e2274e3-9af7-46e7-b4a3-dd656e639be2@googlegroups.com> |
On 9/22/2017 4:48 PM, lewbloch@gmail.com wrote: > The order of loading and initialization is not "at the end ... > implementation defined" but at the beginning specified by the JLS. > http://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html Did you actually read it? Section 12.3: > This specification allows an implementation flexibility as to when > linking activities (and, because of recursion, loading) take place, > provided that the semantics of the Java programming language are > respected, that a class or interface is completely verified and > prepared before it is initialized, and that errors detected during > linkage are thrown at a point in the program where some action is > taken by the program that might require linkage to the class or > interface involved in the error. When *initialization* occurs is very much well-defined. When *loading* occurs is very much not, pretty much the only real caveat is that loading takes place before initialization. OP has clearly stated that he's interested in when loading takes place, not when initialization takes place. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-20 19:23 +0200
Re: Are Outer Classes Loaded Lazily? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-09-20 17:45 -0400
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-21 01:18 +0200
Re: Are Outer Classes Loaded Lazily? lewbloch@gmail.com - 2017-09-20 17:28 -0700
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-21 09:29 +0200
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-21 09:40 +0200
Re: Are Outer Classes Loaded Lazily? lewbloch@gmail.com - 2017-09-21 11:44 -0700
Re: Are Outer Classes Loaded Lazily? Marcel Mueller <news.5.maazl@spamgourmet.org> - 2017-09-21 21:18 +0200
Re: Are Outer Classes Loaded Lazily? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-09-21 16:20 -0400
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-22 11:12 +0200
Re: Are Outer Classes Loaded Lazily? Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2017-09-22 15:55 -0400
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-23 18:33 +0200
Re: Are Outer Classes Loaded Lazily? lewbloch@gmail.com - 2017-09-22 13:48 -0700
Re: Are Outer Classes Loaded Lazily? Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2017-09-22 23:46 -0400
Re: Are Outer Classes Loaded Lazily? lewbloch@gmail.com - 2017-09-25 13:23 -0700
Re: Are Outer Classes Loaded Lazily? j4n bur53 <janburse@fastmail.fm> - 2017-09-24 17:39 +0200
Re: Are Outer Classes Loaded Lazily? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-09-25 07:38 -0400
Re: Are Outer Classes Loaded Lazily? lewbloch@gmail.com - 2017-09-25 13:25 -0700
csiph-web