diff options
author | Michael Bien <[email protected]> | 2010-02-28 16:41:24 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-02-28 16:41:24 +0100 |
commit | 19c1825b81e9add833077260bb937416268a1bf6 (patch) | |
tree | 3a7cc340d457b33c8eacd9652220ffca86592365 /src/com/mbien/opencl/Disposable.java | |
parent | f24477382cc1c26d5f5fd0a09e2c42c7f60cb974 (diff) |
introduced (package private) Disposable interface for forward compatiblility with JDK7's ARM blocks.
CLResource extends Disposable.
Diffstat (limited to 'src/com/mbien/opencl/Disposable.java')
-rw-r--r-- | src/com/mbien/opencl/Disposable.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/com/mbien/opencl/Disposable.java b/src/com/mbien/opencl/Disposable.java new file mode 100644 index 00000000..f85f99b6 --- /dev/null +++ b/src/com/mbien/opencl/Disposable.java @@ -0,0 +1,21 @@ +package com.mbien.opencl; + +/* + * JDK7 ARM proposal, cypied to be forward compatible with java 7 automatic resource managment blocks. + * @author Michael Bien + */ + +//package java.lang; + +/** + * A resource that must be closed when it is no longer needed. + * + * @param X the type of exception thrown by the close method (or + * {@link RuntimeException} if the close method is not permitted + * to throw any checked exceptions). + */ +/*public*/ interface Disposable<X extends Throwable> { + + void close() throws X; + +} |