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()
DebugConfiggetLogLevel in interface DebugConfigpublic boolean isLogEnabledForMethod()
DebugConfigisLogEnabledForMethod in interface DebugConfigpublic boolean isMeterEnabled()
DebugConfigisMeterEnabled in interface DebugConfigDebug.metric(CharSequence)public boolean isMemUseTrackingEnabled()
DebugConfigisMemUseTrackingEnabled in interface DebugConfigDebug.memUseTracker(CharSequence)public int getDumpLevel()
DebugConfiggetDumpLevel in interface DebugConfigpublic boolean isDumpEnabledForMethod()
DebugConfigisDumpEnabledForMethod in interface DebugConfigpublic boolean isVerifyEnabled()
isVerifyEnabled in interface DebugConfigDebug.isVerifyEnabled()public boolean isVerifyEnabledForMethod()
isVerifyEnabledForMethod in interface DebugConfigDebug.isVerifyEnabledForMethod()public boolean isTimeEnabled()
isTimeEnabled in interface DebugConfigDebug.timer(CharSequence)public RuntimeException interceptException(Throwable e)
DebugConfiginterceptException in interface DebugConfignull indicates that e is to be propagated.public Collection<DebugDumpHandler> dumpHandlers()
DebugConfigdumpHandlers in interface DebugConfigpublic Collection<DebugVerifyHandler> verifyHandlers()
DebugConfigverifyHandlers in interface DebugConfigpublic PrintStream output()
output in interface DebugConfigpublic void addToContext(Object o)
DebugConfigaddToContext in interface DebugConfigpublic void removeFromContext(Object o)
DebugConfigDebugConfig.addToContext(Object).removeFromContext in interface DebugConfig