Package org.apache.calcite.util
Class BarfingInvocationHandler
- java.lang.Object
-
- org.apache.calcite.util.BarfingInvocationHandler
-
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler
- Direct Known Subclasses:
SqlUtil.DatabaseMetaDataInvocationHandler
public class BarfingInvocationHandler extends java.lang.Object implements java.lang.reflect.InvocationHandler
A class derived fromBarfingInvocationHandler
handles a method call by looking for a method in itself with identical parameters. If no such method is found, it throwsUnsupportedOperationException
.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.
- See Also:
DelegatingInvocationHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BarfingInvocationHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
protected java.lang.UnsupportedOperationException
noMethod(java.lang.reflect.Method method)
Called when this class (or its derived class) does not have the required method from the interface.
-
-
-
Method Detail
-
invoke
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
- Specified by:
invoke
in interfacejava.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable
-
noMethod
protected java.lang.UnsupportedOperationException noMethod(java.lang.reflect.Method method)
Called when this class (or its derived class) does not have the required method from the interface.
-
-