saffron.util
Class BarfingInvocationHandler
java.lang.Object
|
+--saffron.util.BarfingInvocationHandler
- All Implemented Interfaces:
- InvocationHandler
- Direct Known Subclasses:
- SqlNode.DatabaseMetaDataInvocationHandler
- public class BarfingInvocationHandler
- extends Object
- implements InvocationHandler
A class derived from BarfingInvocationHandler
handles a
method call by looking for a method in itself with identical parameters. If
no such method is found, it throws UnsupportedOperationException
.
It is useful when you are prototyping code. You can rapidly create a
prototype class which implements the important methods in an interface, then
implement other methods as they are called.
- Since:
- Dec 23, 2002
- Version:
- $Id: //open/saffron/src/main/saffron/util/BarfingInvocationHandler.java#1 $
- Author:
- jhyde
- See Also:
DelegatingInvocationHandler
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BarfingInvocationHandler
protected BarfingInvocationHandler()
invoke
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
- Specified by:
invoke
in interface InvocationHandler
Throwable
noMethod
protected UnsupportedOperationException noMethod(Method method)
- Called when this class (or its derived class) does not have the
required method from the interface.