Package org.jbehave.core.reporters
Class FilePrintStreamFactory
java.lang.Object
org.jbehave.core.reporters.FilePrintStreamFactory
- All Implemented Interfaces:
PrintStreamFactory
Creates
PrintStream
instances that write to a file identified by the
StoryLocation
. FilePrintStreamFactory.FileConfiguration
specifies directory and the
extension, providing useful default values.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Resolves directory from code location parent file.static class
Configuration class for file print streams.static interface
static class
class
static class
Resolves story location path to java packaged name, replacing '/' with '.'static class
Resolves story location path to simple name, considering portion after last '/'. -
Constructor Summary
ConstructorsConstructorDescriptionFilePrintStreamFactory
(StoryLocation storyLocation) FilePrintStreamFactory
(StoryLocation storyLocation, FilePrintStreamFactory.FileConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionprotected File
Return the file output directory, using the configuredFilePrintStreamFactory.FilePathResolver
protected File
protected String
Return the file output name, using the configuredFilePrintStreamFactory.FilePathResolver
void
useConfiguration
(FilePrintStreamFactory.FileConfiguration configuration)
-
Constructor Details
-
FilePrintStreamFactory
-
FilePrintStreamFactory
public FilePrintStreamFactory(StoryLocation storyLocation, FilePrintStreamFactory.FileConfiguration configuration)
-
-
Method Details
-
createPrintStream
- Specified by:
createPrintStream
in interfacePrintStreamFactory
-
getOutputFile
-
useConfiguration
-
configuration
-
outputFile
-
outputDirectory
Return the file output directory, using the configuredFilePrintStreamFactory.FilePathResolver
- Returns:
- The File representing the output directory
-
outputName
Return the file output name, using the configuredFilePrintStreamFactory.FilePathResolver
- Returns:
- The file output name
-