org.apache.ibatis.executor.loader.AbstractSerialStateHolder Maven / Gradle / Ivy
/**
* Copyright 2009-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.executor.loader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.Externalizable;
import java.io.IOException;
import java.io.InvalidClassException;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamException;
import java.io.StreamCorruptedException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.reflection.factory.ObjectFactory;
/**
* @author Eduardo Macarron
* @author Franta Mejta
*/
public abstract class AbstractSerialStateHolder implements Externalizable {
private static final long serialVersionUID = 8940388717901644661L;
private static final ThreadLocal stream = new ThreadLocal();
private byte[] userBeanBytes = new byte[0];
private Object userBean;
private Map unloadedProperties;
private ObjectFactory objectFactory;
private Class>[] constructorArgTypes;
private Object[] constructorArgs;
public AbstractSerialStateHolder() {
}
public AbstractSerialStateHolder(
final Object userBean,
final Map unloadedProperties,
final ObjectFactory objectFactory,
List> constructorArgTypes,
List