public class DestructingGuard
extends java.lang.Object
User may subclass this class to override exception logging in handleFinallyProblem methods.
Constructor and Description |
---|
DestructingGuard() |
Modifier and Type | Method and Description |
---|---|
void |
addValue(Destructable destructable)
Adds another value that should be destructed.
|
void |
discharge()
Confirms that constructing has finished OKAY and no destruction is needed from now.
|
void |
doFinally()
This method is supposed to be called from finally clause.
|
protected void |
handleFinallyProblem(java.lang.Error e) |
protected void |
handleFinallyProblem(java.lang.RuntimeException e) |
public void discharge()
public void doFinally()
discharge()
has been called.public void addValue(Destructable destructable)
protected void handleFinallyProblem(java.lang.RuntimeException e)
protected void handleFinallyProblem(java.lang.Error e)
Copyright (c) IBM Corp. and others 2000, 2016. All Rights Reserved.