X - The exception type which may get thrown by close().
If this is an IOException, then the subclass can implement
the Closeable interface, too.@CleanupObligation public abstract class Resource<X extends Exception> extends Object
| Constructor and Description |
|---|
Resource() |
@DischargesObligation
public final void close()
throws X extends Exception
onClose() gets
called.
Otherwhise the call gets ignored.
Upon successful return from onClose(), this resource gets marked
as closed, so a subsequent call to this method will do nothing.Copyright © 2005-2013 Schlichtherle IT Services. All Rights Reserved.