public class DelegatingDebugConfig extends Object implements DebugConfig
Modifier and Type | Class and Description |
---|---|
static class |
DelegatingDebugConfig.Feature
|
static class |
DelegatingDebugConfig.Level
|
Modifier and Type | Field and Description |
---|---|
protected DebugConfig |
delegate |
private Map<DelegatingDebugConfig.Feature,Boolean> |
featureState |
private Map<DelegatingDebugConfig.Level,Integer> |
levelState |
Constructor and Description |
---|
DelegatingDebugConfig()
Creates a config that delegates to the
current config . |
DelegatingDebugConfig(DebugConfig delegate)
Creates a config that delegates to a given config.
|
Modifier and Type | Method and Description |
---|---|
void |
addToContext(Object o)
Adds an object the context used by this configuration to do filtering.
|
DelegatingDebugConfig |
delegate(DelegatingDebugConfig.Feature feature) |
DelegatingDebugConfig |
delegate(DelegatingDebugConfig.Level level) |
DelegatingDebugConfig |
disable(DelegatingDebugConfig.Feature feature) |
Collection<DebugDumpHandler> |
dumpHandlers()
Gets the modifiable collection of dump handlers registered with this configuration.
|
DelegatingDebugConfig |
enable(DelegatingDebugConfig.Feature feature) |
int |
getDumpLevel()
Determines the current dump level in the current debug
scope.
|
int |
getLogLevel()
Determines the current log level in the current debug scope
.
|
RuntimeException |
interceptException(Throwable e)
Handles notification of an exception occurring within a debug scope.
|
boolean |
isDumpEnabledForMethod()
Determines if dumping can be enabled in the current method, regardless of the
current debug scope.
|
boolean |
isLogEnabledForMethod()
Determines if logging can be enabled in the current method, regardless of the
current debug scope.
|
boolean |
isMemUseTrackingEnabled()
Determines if memory use tracking is enabled in the current
debug scope.
|
boolean |
isMeterEnabled()
Determines if metering is enabled in the current debug
scope.
|
boolean |
isTimeEnabled() |
boolean |
isVerifyEnabled() |
boolean |
isVerifyEnabledForMethod() |
PrintStream |
output() |
DelegatingDebugConfig |
override(DelegatingDebugConfig.Level level,
int newLevel) |
void |
removeFromContext(Object o)
Removes an object the context used by this configuration to do filtering.
|
Collection<DebugVerifyHandler> |
verifyHandlers()
Gets the modifiable collection of verify handlers registered with this configuration.
|
protected final DebugConfig delegate
private final Map<DelegatingDebugConfig.Feature,Boolean> featureState
private final Map<DelegatingDebugConfig.Level,Integer> levelState
public DelegatingDebugConfig()
current config
.public DelegatingDebugConfig(DebugConfig delegate)
public DelegatingDebugConfig enable(DelegatingDebugConfig.Feature feature)
public DelegatingDebugConfig disable(DelegatingDebugConfig.Feature feature)
public DelegatingDebugConfig override(DelegatingDebugConfig.Level level, int newLevel)
public DelegatingDebugConfig delegate(DelegatingDebugConfig.Feature feature)
public DelegatingDebugConfig delegate(DelegatingDebugConfig.Level level)
public int getLogLevel()
DebugConfig
getLogLevel
in interface DebugConfig
public boolean isLogEnabledForMethod()
DebugConfig
isLogEnabledForMethod
in interface DebugConfig
public boolean isMeterEnabled()
DebugConfig
isMeterEnabled
in interface DebugConfig
Debug.metric(CharSequence)
public boolean isMemUseTrackingEnabled()
DebugConfig
isMemUseTrackingEnabled
in interface DebugConfig
Debug.memUseTracker(CharSequence)
public int getDumpLevel()
DebugConfig
getDumpLevel
in interface DebugConfig
public boolean isDumpEnabledForMethod()
DebugConfig
isDumpEnabledForMethod
in interface DebugConfig
public boolean isVerifyEnabled()
isVerifyEnabled
in interface DebugConfig
Debug.isVerifyEnabled()
public boolean isVerifyEnabledForMethod()
isVerifyEnabledForMethod
in interface DebugConfig
Debug.isVerifyEnabledForMethod()
public boolean isTimeEnabled()
isTimeEnabled
in interface DebugConfig
Debug.timer(CharSequence)
public RuntimeException interceptException(Throwable e)
DebugConfig
interceptException
in interface DebugConfig
null
indicates that e
is to be propagated.public Collection<DebugDumpHandler> dumpHandlers()
DebugConfig
dumpHandlers
in interface DebugConfig
public Collection<DebugVerifyHandler> verifyHandlers()
DebugConfig
verifyHandlers
in interface DebugConfig
public PrintStream output()
output
in interface DebugConfig
public void addToContext(Object o)
DebugConfig
addToContext
in interface DebugConfig
public void removeFromContext(Object o)
DebugConfig
DebugConfig.addToContext(Object)
.removeFromContext
in interface DebugConfig