67 * serialVersionUID of the class. The ObjectStreamClass for a specific class 68 * loaded in this Java VM can be found/created using the lookup method. 69 * 70 * <p>The algorithm to compute the SerialVersionUID is described in 71 * <a href="{@docRoot}/../specs/serialization/class.html#stream-unique-identifiers"> 72 * Object Serialization Specification, Section 4.6, Stream Unique Identifiers</a>. 73 * 74 * @author Mike Warres 75 * @author Roger Riggs 76 * @see ObjectStreamField 77 * @see <a href="{@docRoot}/../specs/serialization/class.html"> 78 * Object Serialization Specification, Section 4, Class Descriptors</a> 79 * @since 1.1 80 */ 81 public class ObjectStreamClass implements Serializable { 82 83 /** serialPersistentFields value indicating no serializable fields */ 84 public static final ObjectStreamField[] NO_FIELDS = 85 new ObjectStreamField[0]; 86 87 private static final long serialVersionUID = -6120832682080437368L; 88 private static final ObjectStreamField[] serialPersistentFields = 89 NO_FIELDS; 90 91 /** reflection factory for obtaining serialization constructors */ 92 private static final ReflectionFactory reflFactory = 93 AccessController.doPrivileged( 94 new ReflectionFactory.GetReflectionFactoryAction()); 95 96 private static class Caches { 97 /** cache mapping local classes -> descriptors */ 98 static final ConcurrentMap<WeakClassKey,Reference<?>> localDescs = 99 new ConcurrentHashMap<>(); 100 101 /** cache mapping field group/local desc pairs -> field reflectors */ 102 static final ConcurrentMap<FieldReflectorKey,Reference<?>> reflectors = 103 new ConcurrentHashMap<>(); 104 105 /** queue for WeakReferences to local classes */ 106 private static final ReferenceQueue<Class<?>> localDescsQueue = 107 new ReferenceQueue<>(); | 67 * serialVersionUID of the class. The ObjectStreamClass for a specific class 68 * loaded in this Java VM can be found/created using the lookup method. 69 * 70 * <p>The algorithm to compute the SerialVersionUID is described in 71 * <a href="{@docRoot}/../specs/serialization/class.html#stream-unique-identifiers"> 72 * Object Serialization Specification, Section 4.6, Stream Unique Identifiers</a>. 73 * 74 * @author Mike Warres 75 * @author Roger Riggs 76 * @see ObjectStreamField 77 * @see <a href="{@docRoot}/../specs/serialization/class.html"> 78 * Object Serialization Specification, Section 4, Class Descriptors</a> 79 * @since 1.1 80 */ 81 public class ObjectStreamClass implements Serializable { 82 83 /** serialPersistentFields value indicating no serializable fields */ 84 public static final ObjectStreamField[] NO_FIELDS = 85 new ObjectStreamField[0]; 86 87 @java.io.Serial 88 private static final long serialVersionUID = -6120832682080437368L; 89 @java.io.Serial 90 private static final ObjectStreamField[] serialPersistentFields = 91 NO_FIELDS; 92 93 /** reflection factory for obtaining serialization constructors */ 94 private static final ReflectionFactory reflFactory = 95 AccessController.doPrivileged( 96 new ReflectionFactory.GetReflectionFactoryAction()); 97 98 private static class Caches { 99 /** cache mapping local classes -> descriptors */ 100 static final ConcurrentMap<WeakClassKey,Reference<?>> localDescs = 101 new ConcurrentHashMap<>(); 102 103 /** cache mapping field group/local desc pairs -> field reflectors */ 104 static final ConcurrentMap<FieldReflectorKey,Reference<?>> reflectors = 105 new ConcurrentHashMap<>(); 106 107 /** queue for WeakReferences to local classes */ 108 private static final ReferenceQueue<Class<?>> localDescsQueue = 109 new ReferenceQueue<>(); |