Class ReportingHelper
java.lang.Object
de.monticore.generating.templateengine.reporting.commons.ReportingHelper
Helper to write files
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatLineToReportingLine(String toBeFormatted, int length) Removes all line breaks.static StringformatStringToReportingString(String toBeFormatted, int length) Removes all tabs and whitespaces.static StringgetChecksum(String file) Calculate the MD5 checksum for the given file.static StringgetHookPointName(String hookName) static StringgetTemplateName(String hookName)
-
Constructor Details
-
ReportingHelper
public ReportingHelper()
-
-
Method Details
-
formatStringToReportingString
Removes all tabs and whitespaces. Transforms the string into a StringValue, beginning and ending with quotes. If the length is lower than 7 and the formatted string does not fit in, the output is "[...]".- Parameters:
toBeFormatted-length-- Returns:
-
formatLineToReportingLine
Removes all line breaks. Returns [...] if formatted string is longer than the parameter length.- Parameters:
toBeFormatted-length-- Returns:
-
getHookPointName
-
getTemplateName
-
getChecksum
Calculate the MD5 checksum for the given file.- Parameters:
file-- Returns:
-