public class ReportUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CHILD |
static String |
CONNECTING_INDENT |
static String |
EMPTY_INDENT |
static String |
LAST_CHILD |
static Comparator<ResolvedJavaMethod> |
methodComparator |
| Constructor and Description |
|---|
ReportUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
extractImageName(String imageName) |
static void |
formatParsingContext(StackTraceElement[] parsingContext,
String indent,
StringBuilder msg) |
static Path |
getCWDRelativePath(Path path)
Returns a path relative to the current working directory if possible.
|
static String |
getTimeStampString() |
static String |
parsingContext(AnalysisMethod method) |
static String |
parsingContext(AnalysisMethod method,
int bci,
String indent,
boolean includeTarget) |
static String |
parsingContext(AnalysisMethod method,
String indent) |
static String |
parsingContext(jdk.vm.ci.code.BytecodePosition context) |
static void |
report(String description,
Path file,
boolean append,
Consumer<OutputStream> reporter)
Print a report in the file given by
file parameter. |
static void |
report(String description,
Path file,
Consumer<PrintWriter> reporter) |
static Path |
report(String description,
Path file,
Consumer<PrintWriter> reporter,
boolean enablePrint)
Print a report in the file given by
file parameter. |
static Path |
report(String description,
String path,
String name,
String extension,
Consumer<PrintWriter> reporter) |
static Path |
report(String description,
String path,
String name,
String extension,
Consumer<PrintWriter> reporter,
boolean enablePrint) |
static Path |
report(String description,
String path,
String name,
String extension,
Consumer<PrintWriter> reporter,
boolean enablePrint,
String timeStamp)
Print a report in the format: path/name_timeStamp.extension.
|
static File |
reportFile(String path,
String name,
String extension) |
static StackTraceElement |
rootMethodSentinel(String reason) |
static String |
timeStampedFileName(String name,
String extension) |
static String |
timeStampedFileName(String name,
String extension,
String timeStamp) |
static StackTraceElement |
truncatedStackTraceSentinel(AnalysisMethod method) |
static String |
typePropagationTrace(PointsToAnalysis bb,
TypeFlow<?> flow,
AnalysisType type) |
static String |
typePropagationTrace(PointsToAnalysis bb,
TypeFlow<?> flow,
AnalysisType type,
String indent) |
public static final String CONNECTING_INDENT
public static final String EMPTY_INDENT
public static final String CHILD
public static final String LAST_CHILD
public static final Comparator<ResolvedJavaMethod> methodComparator
public static Path report(String description, String path, String name, String extension, Consumer<PrintWriter> reporter)
public static Path report(String description, String path, String name, String extension, Consumer<PrintWriter> reporter, boolean enablePrint)
public static Path report(String description, String path, String name, String extension, Consumer<PrintWriter> reporter, boolean enablePrint, String timeStamp)
description - the description of the reportpath - the path (relative to the working directory if the argument represents a relative
path)name - the name of the reportextension - the extension of the reportreporter - a consumer that writes to a PrintWritertimeStamp - from ReportUtils.getTimeStampString()public static String timeStampedFileName(String name, String extension, String timeStamp)
public static String getTimeStampString()
public static void report(String description, Path file, Consumer<PrintWriter> reporter)
public static Path report(String description, Path file, Consumer<PrintWriter> reporter, boolean enablePrint)
file parameter. If the file is relative
it's resolved to the working directory.description - the description of the reportfile - the path (relative to the working directory if the argument represents a relative
path) to file to store a report into.reporter - a consumer that writes to a PrintWriterenablePrint - of a notice to stdoutpublic static Path getCWDRelativePath(Path path)
public static void report(String description, Path file, boolean append, Consumer<OutputStream> reporter)
file parameter. If the file is relative
it's resolved to the working directory.description - the description of the reportfile - the path (relative to the working directory if the argument represents a relative
path) to file to store a report into.reporter - a consumer that writes to a FileOutputStreamappend - flag to append onto filepublic static String parsingContext(AnalysisMethod method)
public static String parsingContext(AnalysisMethod method, String indent)
public static String parsingContext(jdk.vm.ci.code.BytecodePosition context)
public static String parsingContext(AnalysisMethod method, int bci, String indent, boolean includeTarget)
public static void formatParsingContext(StackTraceElement[] parsingContext, String indent, StringBuilder msg)
public static StackTraceElement truncatedStackTraceSentinel(AnalysisMethod method)
public static StackTraceElement rootMethodSentinel(String reason)
public static String typePropagationTrace(PointsToAnalysis bb, TypeFlow<?> flow, AnalysisType type)
public static String typePropagationTrace(PointsToAnalysis bb, TypeFlow<?> flow, AnalysisType type, String indent)