DisposableBeanAdapter.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:lams 作者:
/**
 * Serializes a copy of the state of this class,
 * filtering out non-serializable BeanPostProcessors.
 */
protected Object writeReplace() {
    List<DestructionAwareBeanPostProcessor> serializablePostProcessors = null;
    if (this.beanPostProcessors != null) {
        serializablePostProcessors = new ArrayList<DestructionAwareBeanPostProcessor>();
        for (DestructionAwareBeanPostProcessor postProcessor : this.beanPostProcessors) {
            if (postProcessor instanceof Serializable) {
                serializablePostProcessors.add(postProcessor);
            }
        }
    }
    return new DisposableBeanAdapter(this.bean, this.beanName, this.invokeDisposableBean,
            this.nonPublicAccessAllowed, this.destroyMethodName, serializablePostProcessors);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号