-
Enhancement
-
Resolution: Duplicate
-
P3
-
None
-
5.0
-
generic, x86
-
solaris_8, windows_xp
There is no direct way to force a class to be initialized. Now that class
literals do not do that, it would be extremely helpful for there to be a
direct way to force the initialization. Please add a method
public Class<T> Class.initialize();
to force the class to be initialized. That would allow the idiom
X.class.initialize()
to be used as a class literal for an initialized class.
literals do not do that, it would be extremely helpful for there to be a
direct way to force the initialization. Please add a method
public Class<T> Class.initialize();
to force the class to be initialized. That would allow the idiom
X.class.initialize()
to be used as a class literal for an initialized class.
- duplicates
-
JDK-6459208 Add API for initializing a Class and checking if it has been initialized
- Closed
- relates to
-
JDK-7194006 A new Class.forName(String cn, boolean initialize) method
- Open
-
JDK-8245871 Define Lookup::ensureInitialized as a replacement API for Unsafe::ensureClassInitialized
- Closed