Package jsl.utilities.reporting
Class JSL
- java.lang.Object
-
- jsl.utilities.reporting.JSL
-
public class JSL extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description org.slf4j.LoggerLOGGERfor loggingLogPrintWriterout
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.PathgetExcelDir()static JSLgetInstance()intgetNextEnumConstant()Should be used by classes to get the next constant so that unique constants can be usedjava.nio.file.PathgetOutDir()static voidmain(java.lang.String[] args)java.io.FilemakeFile(java.lang.String fileName)Makes a new PrintWriter within the base directory with the given file namejava.io.PrintWritermakePrintWriter(java.lang.String fileName)Makes a new PrintWriter within the base directory with the given file namejava.nio.file.PathmakeSubDirectory(java.lang.String dirName)Makes a Path to the named sub-directory within the base directory
-
-
-
Field Detail
-
LOGGER
public final org.slf4j.Logger LOGGER
for logging
-
out
public final LogPrintWriter out
-
-
Method Detail
-
getInstance
public static JSL getInstance()
-
getOutDir
public final java.nio.file.Path getOutDir()
- Returns:
- the path to the base directory for this OutputDirectory
-
getExcelDir
public final java.nio.file.Path getExcelDir()
- Returns:
- the path to the default excel directory, relative to this output directory
-
getNextEnumConstant
public int getNextEnumConstant()
Should be used by classes to get the next constant so that unique constants can be used- Returns:
- the constant
-
makePrintWriter
public final java.io.PrintWriter makePrintWriter(java.lang.String fileName)
Makes a new PrintWriter within the base directory with the given file name- Parameters:
fileName- the name of the file for the PrintWriter- Returns:
- the PrintWriter, or System.out if there was some problem with its creation
-
makeFile
public final java.io.File makeFile(java.lang.String fileName)
Makes a new PrintWriter within the base directory with the given file name- Parameters:
fileName- the name of the file for the PrintWriter- Returns:
- the File in the base directory
-
makeSubDirectory
public final java.nio.file.Path makeSubDirectory(java.lang.String dirName)
Makes a Path to the named sub-directory within the base directory- Parameters:
dirName- the name of the sub-directory to create. It must not be null- Returns:
- a path to the created sub-directory, or the base directory if something went wrong in the creation. Any problems are logged.
-
main
public static void main(java.lang.String[] args)
-
-