All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.feilong.lib.xstream.core.ReferencingMarshallingContext Maven / Gradle / Ivy

Go to download

feilong is a suite of core and expanded libraries that include utility classes, http, excel,cvs, io classes, and much much more.

There is a newer version: 4.0.8
Show newest version
/*
 * Copyright (C) 2009, 2011 XStream Committers.
 * All rights reserved.
 *
 * The software in this package is published under the terms of the BSD
 * style license a copy of which has been included with this distribution in
 * the LICENSE.txt file.
 *
 * Created on 06. May 2009 by Joerg Schaible
 */
package com.feilong.lib.xstream.core;

import com.feilong.lib.xstream.converters.MarshallingContext;
import com.feilong.lib.xstream.io.path.Path;

/**
 * A {@link MarshallingContext} that manages references.
 * 
 * @author Jörg Schaible
 * @since 1.4
 */
public interface ReferencingMarshallingContext extends MarshallingContext{

    /**
     * Retrieve the current path.
     * 
     * @return the current path
     * @since 1.4
     * @deprecated As of 1.4.2
     */
    @Deprecated
    Path currentPath();

    /**
     * Request the reference key for the given item
     * 
     * @param item
     *            the item to lookup
     * @return the reference key or null
     * @since 1.4
     */
    Object lookupReference(Object item);

    /**
     * Replace the currently marshalled item.
     * 
     * 

* Use this method only, if you know exactly what you do! It is a special solution for * Serializable types that make usage of the writeReplace method where the replacing object itself is referenced. *

* * @param original * the original item to convert * @param replacement * the replacement item that is converted instead * @since 1.4 */ void replace(Object original,Object replacement); /** * Register an implicit element. This is typically some kind of collection. Note, that this object may not be * referenced anywhere else in the object stream. * * @param item * the object that is implicit * @since 1.4 */ void registerImplicit(Object item); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy