Package org.locationtech.jts.util
Class Debug
java.lang.Object
org.locationtech.jts.util.Debug
Provides routines to simplify and localize debugging output.
Debugging is controlled via a Java system property value.
If the system property with the name given in
DEBUG_PROPERTY_NAME (currently "jts.debug") has the value
"on" or "true" debugging is enabled.
Otherwise, debugging is disabled.
The system property can be set by specifying the following JVM option:
-Djts.debug=on
- Version:
- 1.7
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Object[]
private static final Debug
private static final String
static String
static String
static String
private static boolean
private static final GeometryFactory
private static long
private PrintStream
private Class[]
private static Stopwatch
private Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Adds an object to be watched.static void
breakIf
(boolean cond) static void
breakIfEqual
(Object o1, Object o2) static void
breakIfEqual
(Coordinate p0, Coordinate p1, double tolerance) private static void
doBreak()
static boolean
equals
(Coordinate c1, Coordinate c2, double tolerance) private static String
formatField
(String s, int fieldLen) static boolean
hasSegment
(Geometry geom, Coordinate p0, Coordinate p1) private void
instanceAddWatch
(Object obj) void
instancePrint
(Object obj) private void
instancePrint
(String str) void
void
void
void
static boolean
static void
Prints the status of debugging to System.outstatic void
static void
static void
static void
printIfWatch
(Object obj) void
println()
static void
static void
static void
static void
private static String
spaces
(int n) static LineString
toLine
(Coordinate p0, Coordinate p1) static LineString
toLine
(Coordinate p0, Coordinate p1, Coordinate p2) static LineString
toLine
(Coordinate p0, Coordinate p1, Coordinate p2, Coordinate p3)
-
Field Details
-
DEBUG_PROPERTY_NAME
-
DEBUG_PROPERTY_VALUE_ON
-
DEBUG_PROPERTY_VALUE_TRUE
-
debugOn
private static boolean debugOn -
stopwatch
-
lastTimePrinted
private static long lastTimePrinted -
debug
-
fact
-
DEBUG_LINE_TAG
- See Also:
-
out
-
printArgs
-
watchObj
-
args
-
-
Constructor Details
-
Debug
private Debug()
-
-
Method Details
-
main
Prints the status of debugging to System.out- Parameters:
args
- the cmd-line arguments (no arguments are required)
-
isDebugging
public static boolean isDebugging() -
toLine
-
toLine
-
toLine
-
print
-
print
-
print
-
println
-
resetTime
public static void resetTime() -
printTime
-
formatField
-
spaces
-
equals
-
addWatch
Adds an object to be watched. A watched object can be printed out at any time. Currently only supports one watched object at a time.- Parameters:
obj
-
-
printWatch
public static void printWatch() -
printIfWatch
-
breakIf
public static void breakIf(boolean cond) -
breakIfEqual
-
breakIfEqual
-
doBreak
private static void doBreak() -
hasSegment
-
instancePrintWatch
public void instancePrintWatch() -
instancePrintIfWatch
-
instancePrint
-
instancePrint
-
instancePrintObject
-
println
public void println() -
instanceAddWatch
-
instancePrint
-