JDK support for VM to read classes from modules in a module library (original) (raw)

David Holmes david.holmes at oracle.com
Thu May 10 02:36:05 PDT 2012


On 10/05/2012 6:49 PM, Paul Sandoz wrote:

On May 9, 2012, at 6:52 PM, Mandy Chung wrote:

[*] i must admit to never quite understanding what this flag means. Java doc states that for initialize parameter "whether the class must be initialized". Is that a constraint or an action? I presume the later.

Yes, the later - that indicates whether the class static initializer will be invoked or not. Could we update the JavaDoc :-) @param initialize if true the class will be initialized (specifically the class static initializer will be invoked) [refer to errors on initialization], otherwise the class is not initialized [refer to when it will be initialized].

A better update in my opinion would be to simply say:

@param initialize if true the class will be initialized - see JLS 12.4

Seriously, anyone using API's for explicit class loading should have read about classloading and initialization - we're doing them a favour by pointing them to the JLS if they don't understand what class initialization is.

David

Thanks, Paul.



More information about the jigsaw-dev mailing list