Examples of popCallback()


Examples of com.thoughtworks.xstream.core.util.CustomObjectInputStream.popCallback()

                if (serializationMethodInvoker.supportsReadObject(currentType[0], false)) {
                    @SuppressWarnings("resource")
                    final CustomObjectInputStream objectInputStream = CustomObjectInputStream.getInstance(context,
                        callback, classLoaderReference);
                    serializationMethodInvoker.callReadObject(currentType[0], result, objectInputStream);
                    objectInputStream.popCallback();
                } else {
                    try {
                        callback.defaultReadObject();
                    } catch (final IOException e) {
                        throw new ObjectAccessException("Could not call defaultWriteObject()", e);
View Full Code Here

Examples of com.thoughtworks.xstream.core.util.CustomObjectInputStream.popCallback()

            {
                @SuppressWarnings("resource")
                final CustomObjectInputStream objectInput = CustomObjectInputStream.getInstance(context, callback,
                    classLoaderReference);
                externalizable.readExternal(objectInput);
                objectInput.popCallback();
            }
            return externalizable;
        } catch (final NoSuchMethodException e) {
            throw new ConversionException("Cannot construct " + type.getClass() + ", missing default constructor", e);
        } catch (final InvocationTargetException e) {
View Full Code Here

Examples of com.thoughtworks.xstream.core.util.CustomObjectInputStream.popCallback()

                }
                if (serializationMethodInvoker.supportsReadObject(currentType[0], false)) {
                    CustomObjectInputStream objectInputStream =
                        CustomObjectInputStream.getInstance(context, callback, classLoader);
                    serializationMethodInvoker.callReadObject(currentType[0], result, objectInputStream);
                    objectInputStream.popCallback();
                } else {
                    try {
                        callback.defaultReadObject();
                    } catch (IOException e) {
                        throw new ObjectAccessException("Could not call defaultWriteObject()", e);
View Full Code Here

Examples of com.thoughtworks.xstream.core.util.CustomObjectInputStream.popCallback()

                    throw new UnsupportedOperationException("Objects are not allowed to call ObjectInput.close() from readExternal()");
                }
            };
            CustomObjectInputStream objectInput = CustomObjectInputStream.getInstance(context, callback, classLoader);
            externalizable.readExternal(objectInput);
            objectInput.popCallback();
            return externalizable;
        } catch (NoSuchMethodException e) {
            throw new ConversionException("Cannot construct " + type.getClass() + ", missing default constructor", e);
        } catch (InvocationTargetException e) {
            throw new ConversionException("Cannot construct " + type.getClass(), e);
View Full Code Here

Examples of com.thoughtworks.xstream.core.util.CustomObjectInputStream.popCallback()

                    throw new UnsupportedOperationException("Objects are not allowed to call ObjectInput.close() from readExternal()");
                }
            };
            CustomObjectInputStream objectInput = CustomObjectInputStream.getInstance(context, callback);
            externalizable.readExternal(objectInput);
            objectInput.popCallback();
            return externalizable;
        } catch (InstantiationException e) {
            throw new ConversionException("Cannot construct " + type.getClass(), e);
        } catch (IllegalAccessException e) {
            throw new ConversionException("Cannot construct " + type.getClass(), e);
View Full Code Here

Examples of com.thoughtworks.xstream.core.util.CustomObjectInputStream.popCallback()

            } else {
                currentType[0] = mapper.defaultImplementationOf(mapper.realClass(nodeName));
                if (serializationMethodInvoker.supportsReadObject(currentType[0], false)) {
                    CustomObjectInputStream objectInputStream = CustomObjectInputStream.getInstance(context, callback);
                    serializationMethodInvoker.callReadObject(currentType[0], result, objectInputStream);
                    objectInputStream.popCallback();
                } else {
                    try {
                        callback.defaultReadObject();
                    } catch (IOException e) {
                        throw new ObjectAccessException("Could not call defaultWriteObject()", e);
View Full Code Here

Examples of com.thoughtworks.xstream.core.util.CustomObjectInputStream.popCallback()

        final org.spearce.jgit.transport.RemoteConfig remoteConfig = new org.spearce.jgit.transport.RemoteConfig();
        CustomObjectInputStream.StreamCallback callback = new LegacyInputStreamCallback(reader, context, remoteConfig);
        try {
            CustomObjectInputStream objectInput = CustomObjectInputStream.getInstance(context, callback, null);
            remoteConfig.readExternal(objectInput);
            objectInput.popCallback();
            return remoteConfig.toRemote();
        } catch (Exception e) {
            throw new ConversionException("Unmarshal failed", e);
        }
    }
View Full Code Here

Examples of com.thoughtworks.xstream.core.util.CustomObjectInputStream.popCallback()

                    throw new UnsupportedOperationException("Objects are not allowed to call ObjectInput.close() from readExternal()");
                }
            };
            CustomObjectInputStream objectInput = CustomObjectInputStream.getInstance(context, callback);
            externalizable.readExternal(objectInput);
            objectInput.popCallback();
            return externalizable;
        } catch (InstantiationException e) {
            throw new ConversionException("Cannot construct " + type.getClass(), e);
        } catch (IllegalAccessException e) {
            throw new ConversionException("Cannot construct " + type.getClass(), e);
View Full Code Here

Examples of com.thoughtworks.xstream.core.util.CustomObjectInputStream.popCallback()

                    currentType[0] = mapper.realClass(classAttribute);
                }
                if (serializationMethodInvoker.supportsReadObject(currentType[0], false)) {
                    CustomObjectInputStream objectInputStream = CustomObjectInputStream.getInstance(context, callback);
                    serializationMethodInvoker.callReadObject(currentType[0], result, objectInputStream);
                    objectInputStream.popCallback();
                } else {
                    try {
                        callback.defaultReadObject();
                    } catch (IOException e) {
                        throw new ObjectAccessException("Could not call defaultWriteObject()", e);
View Full Code Here

Examples of com.thoughtworks.xstream.core.util.CustomObjectOutputStream.popCallback()

                        }
                        @SuppressWarnings("resource")
                        final CustomObjectOutputStream objectOutputStream = CustomObjectOutputStream.getInstance(
                            context, callback);
                        serializationMethodInvoker.callWriteObject(currentType, source, objectOutputStream);
                        objectOutputStream.popCallback();
                        writer.endNode();
                    } else if (serializationMethodInvoker.supportsReadObject(currentType, false)) {
                        // Special case for objects that have readObject(), but not writeObject().
                        // The class wrapper is always written, whether or not this class in the hierarchy has
                        // serializable fields. This guarantees that readObject() will be called upon deserialization.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.