public ClassDescriptor(Reflection reflection, Class<?> cls) { this.cls = cls; this.instantiator = getInstantiator(reflection, cls); if (!Externalizable.class.isAssignableFrom(cls)) { this.writeObjectMethod = getPrivateMethod(cls, "writeObject", WRITE_OBJECT_PARAMS, Void.TYPE); this.readObjectMethod = getPrivateMethod(cls, "readObject", READ_OBJECT_PARAMS, Void.TYPE); } else { this.writeObjectMethod = null; this.readObjectMethod = null; } this.writeReplaceMethod = getInheritedMethod(cls, "writeReplace", null, Object.class); this.readResolveMethod = getInheritedMethod(cls, "readResolve", null, Object.class); this.properties = getSerializableProperties(reflection, cls); this.parent = reflection.getDescriptor(cls.getSuperclass()); }
public ClassDescriptor(Reflection reflection, Class<?> cls) { this.cls = cls; this.instantiator = getInstantiator(reflection, cls); if (!Externalizable.class.isAssignableFrom(cls)) { this.writeObjectMethod = getPrivateMethod(cls, "writeObject", WRITE_OBJECT_PARAMS, Void.TYPE); this.readObjectMethod = getPrivateMethod(cls, "readObject", READ_OBJECT_PARAMS, Void.TYPE); } else { this.writeObjectMethod = null; this.readObjectMethod = null; } this.writeReplaceMethod = getInheritedMethod(cls, "writeReplace", null, Object.class); this.readResolveMethod = getInheritedMethod(cls, "readResolve", null, Object.class); this.properties = getSerializableProperties(reflection, cls); this.parent = reflection.getDescriptor(cls.getSuperclass()); }
public ClassDescriptor(Reflection reflection, Class<?> cls) { this.cls = cls; this.instantiator = getInstantiator(reflection, cls); if (!Externalizable.class.isAssignableFrom(cls)) { this.writeObjectMethod = getPrivateMethod(cls, "writeObject", WRITE_OBJECT_PARAMS, Void.TYPE); this.readObjectMethod = getPrivateMethod(cls, "readObject", READ_OBJECT_PARAMS, Void.TYPE); } else { this.writeObjectMethod = null; this.readObjectMethod = null; } this.writeReplaceMethod = getInheritedMethod(cls, "writeReplace", null, Object.class); this.readResolveMethod = getInheritedMethod(cls, "readResolve", null, Object.class); this.properties = getSerializableProperties(reflection, cls); this.parent = reflection.getDescriptor(cls.getSuperclass()); }