public final class BuildOutputInitializer<T> extends Object
InitializableFromDisk
and is responsible for safely storing
and retrieving the in-memory data structures.Constructor and Description |
---|
BuildOutputInitializer(BuildTarget buildTarget,
InitializableFromDisk<T> initializableFromDisk) |
Modifier and Type | Method and Description |
---|---|
T |
getBuildOutput()
The initialized buildOutput.
|
void |
initializeFromDisk(SourcePathResolverAdapter pathResolver)
Initializes the build output from the on disk state.
|
void |
invalidate()
Invalidates the cached build output.
|
void |
setBuildOutputForTests(T buildOutput)
This should be invoked only by the build engine (currently,
CachingBuildEngine ) that invoked initializeFromDisk(SourcePathResolverAdapter) . |
public BuildOutputInitializer(BuildTarget buildTarget, InitializableFromDisk<T> initializableFromDisk)
public void invalidate()
public void initializeFromDisk(SourcePathResolverAdapter pathResolver) throws IOException
IOException
public void setBuildOutputForTests(T buildOutput) throws IllegalStateException
CachingBuildEngine
) that invoked initializeFromDisk(SourcePathResolverAdapter)
.
IllegalStateException
- if this method has already been invoked.public T getBuildOutput() throws IllegalStateException
IllegalStateException