@Override public ClassDescriptor getClassDescriptor(Class<?> cls) { ClassDescriptor desc = classDescriptors.get(cls.getName()); if (desc == null) { desc = context.getReflection().getDescriptor(cls); classDescriptors.put(cls.getName(), desc); } return desc; }
public List<Property> findSerializableProperties(Class<?> cls) throws SecurityException { ClassDescriptor descriptor = getDescriptor(cls); if (descriptor == null) return Collections.emptyList(); return descriptor.getInheritedSerializableProperties(); }
@Override public ClassDescriptor getClassDescriptor(Class<?> cls) { ClassDescriptor desc = classDescriptors.get(cls.getName()); if (desc == null) { desc = context.getReflection().getDescriptor(cls); classDescriptors.put(cls.getName(), desc); } return desc; }
public List<Property> findSerializableProperties(Class<?> cls) throws SecurityException { ClassDescriptor descriptor = getDescriptor(cls); if (descriptor == null) return Collections.emptyList(); return descriptor.getInheritedSerializableProperties(); }
public List<Property> findSerializableProperties(Class<?> cls) throws SecurityException { ClassDescriptor descriptor = getDescriptor(cls); if (descriptor == null) return Collections.emptyList(); return descriptor.getInheritedSerializableProperties(); }
@Override public ClassDescriptor getClassDescriptor(Class<?> cls) { ClassDescriptor desc = classDescriptors.get(cls.getName()); if (desc == null) { desc = context.getReflection().getDescriptor(cls); classDescriptors.put(cls.getName(), desc); } return desc; }
@Override public ClassDescriptor getClassDescriptor(String className) throws ClassNotFoundException { ClassDescriptor desc = classDescriptors.get(className); if (desc == null) { Class<?> cls = context.getReflection().loadClass(className); desc = context.getReflection().getDescriptor(cls); classDescriptors.put(className, desc); } return desc; }
@Override public ClassDescriptor getClassDescriptor(String className) throws ClassNotFoundException { ClassDescriptor desc = classDescriptors.get(className); if (desc == null) { Class<?> cls = context.getReflection().loadClass(className); desc = context.getReflection().getDescriptor(cls); classDescriptors.put(className, desc); } return desc; }
@Override public ClassDescriptor getClassDescriptor(String className) throws ClassNotFoundException { ClassDescriptor desc = classDescriptors.get(className); if (desc == null) { Class<?> cls = context.getReflection().loadClass(className); desc = context.getReflection().getDescriptor(cls); classDescriptors.put(className, desc); } return desc; }
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()); }
ClassDescriptor desc = ctx.getReflection().getDescriptor(v.getClass()); throw new JMFEncodingException(desc.getCls() + ".writeReplace() method returned an instance of the same class"); ClassDescriptor replacementDesc = ctx.getReflection().getDescriptor(replacement.getClass()); if (replacementDesc == null || !replacementDesc.hasReadResolveMethod()) { throw new JMFEncodingException(
ClassDescriptor desc = ctx.getReflection().getDescriptor(v.getClass()); throw new JMFEncodingException(desc.getCls() + ".writeReplace() method returned an instance of the same class"); ClassDescriptor replacementDesc = ctx.getReflection().getDescriptor(replacement.getClass()); if (replacementDesc == null || !replacementDesc.hasReadResolveMethod()) { throw new JMFEncodingException(
ClassDescriptor desc = ctx.getReflection().getDescriptor(v.getClass()); throw new JMFEncodingException(desc.getCls() + ".writeReplace() method returned an instance of the same class"); ClassDescriptor replacementDesc = ctx.getReflection().getDescriptor(replacement.getClass()); if (replacementDesc == null || !replacementDesc.hasReadResolveMethod()) { throw new JMFEncodingException(