Class InputOutputContextSubdirectoryCache
Object
org.anchoranalysis.io.output.outputter.InputOutputContextSubdirectoryCache
public class InputOutputContextSubdirectoryCache extends Object
Caches a
InputOutputContext for each subdirectory as they are created.
This allows reusage of an existing InputOutputContext in other outputters without
creating any potential clashes.
TODO is this still needed without manifests?
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description InputOutputContextSubdirectoryCache(InputOutputContext parentContext, boolean inheritOutputRulesAndRecording) -
Method Summary
Modifier and Type Method Description InputOutputContextget(Optional<String> subdirectoryName)Gets (from the cache if it's already there) a context for a subdirectory of given-name
-
Constructor Details
-
InputOutputContextSubdirectoryCache
public InputOutputContextSubdirectoryCache(InputOutputContext parentContext, boolean inheritOutputRulesAndRecording)
-
-
Method Details
-
get
Gets (from the cache if it's already there) a context for a subdirectory of given-name- Parameters:
subdirectoryName- the subdirectory name. if not set, then the parentContext is returned instead.- Returns:
- either an existing context for the subdirectory or a newly created one
-