public class DebugConfigScope extends Object implements AutoCloseable
DebugConfig config = ...; try (DebugConfigScope s = new DebugConfigScope(config)) { // ... }
Modifier and Type | Field and Description |
---|---|
private DebugConfig |
current |
Constructor and Description |
---|
DebugConfigScope(DebugConfig config)
Sets the current debug configuration to a
given value and creates an object that when closed resets the
configuration to the current configuration.
|
private final DebugConfig current
public DebugConfigScope(DebugConfig config)
public void close()
close
in interface AutoCloseable