safejdbc
Class ResultSetIterator.ProtectedResultSetHandler

java.lang.Object
safejdbc.ResultSetIterator.ProtectedResultSetHandler
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler
- Enclosing class:
- ResultSetIterator
- private static class ResultSetIterator.ProtectedResultSetHandler
- extends java.lang.Object
- implements java.lang.reflect.InvocationHandler
This class uses dynamic proxy functionality to prevent calls
to "next" or "close" on a ResultSet. A dynamic proxy was used
instead of a "conventional" Decorator pattern because
ResultSet has very many methods and this is shorter. It also
has better testability.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_inner
private final java.sql.ResultSet _inner
_forbiddenMethodNames
private final java.util.Collection _forbiddenMethodNames
ResultSetIterator.ProtectedResultSetHandler
public ResultSetIterator.ProtectedResultSetHandler(java.sql.ResultSet inner)
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- Description copied from interface:
java.lang.reflect.InvocationHandler
- When a method is invoked on a proxy instance, it is wrapped and
this method is called instead, so that you may decide at runtime
how the original method should behave.
- Specified by:
invoke in interface java.lang.reflect.InvocationHandler