 
                        
        
                        
        xsbti.api.AbstractLazy Maven / Gradle / Ivy
                 Go to download
                
        
                    Show more of this group  Show more artifacts with this name
Show all versions of compiler-interface Show documentation
                Show all versions of compiler-interface Show documentation
Incremental compiler of Scala
                
            /* sbt -- Simple Build Tool
 * Copyright 2010  Mark Harrah
 */
package xsbti.api;
import java.io.ObjectStreamException;
public abstract class AbstractLazy implements Lazy, java.io.Serializable
{
	// `writeReplace` must be `protected`, so that the `Impl` subclass
	// inherits the serialization override.
	//
	// (See source-dependencies/java-analysis-serialization-error, which would
	//  crash trying to serialize an AbstractLazy, because it pulled in an
	//  unserializable type eventually.)
	protected Object writeReplace() throws ObjectStreamException
	{
		return new StrictLazy(get());
	}
	private static final class StrictLazy implements Lazy, java.io.Serializable
	{
		private final T value;
		StrictLazy(T t)
		{
			value = t;
		}
		public T get()
		{
			return value;
		}
	}
}     © 2015 - 2025 Weber Informatics LLC | Privacy Policy