oracle.cabo.ui.data.provider
Class MethodDataProvider
java.lang.Object
|
+--oracle.cabo.ui.data.provider.MethodDataProvider
- All Implemented Interfaces:
- DataProvider
- public class MethodDataProvider
- extends java.lang.Object
- implements DataProvider
DataProvider that binds to a method with introspection.
The method can have any name, but must still have the some parameters
as DataProvider.getDataObject()
.
Constructor Summary |
MethodDataProvider(java.lang.Class classInstance,
java.lang.String name)
Creates a MethodDataProvider bound to a static method. |
MethodDataProvider(java.lang.Object instance,
java.lang.String name)
Creates a MethodDataProvider bound to an instance method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodDataProvider
public MethodDataProvider(java.lang.Object instance,
java.lang.String name)
throws java.lang.NoSuchMethodException
- Creates a MethodDataProvider bound to an instance method.
- Parameters:
instance
- the object on which the method should be calledname
- the name of the method
MethodDataProvider
public MethodDataProvider(java.lang.Class classInstance,
java.lang.String name)
throws java.lang.NoSuchMethodException
- Creates a MethodDataProvider bound to a static method.
- Parameters:
classInstance
- the class on which the method should be calledname
- the name of the static method
getDataObject
public DataObject getDataObject(RenderingContext context,
java.lang.String namespaceURI,
java.lang.String localName)
- Specified by:
getDataObject
in interface DataProvider
- Following copied from interface:
oracle.cabo.ui.data.DataProvider
- Parameters:
context
- the current rendering contextnamespace
- the namespace of the requested DataObjectname
- the name of the requested DataObject- Returns:
- the DataObject for the specified namespace and name, or
null if no such dataObject exists.
init
public void init(RenderingContext c)
- Description copied from interface:
DataProvider
- RenderingContext implementations must call init() once
before calling getDataObject(). In general, they should
try to call it as early as possible.
- Specified by:
init
in interface DataProvider
cleanup
public void cleanup(RenderingContext c)
- Description copied from interface:
DataProvider
- RenderingContext implementations must call cleanup() once
after the last callto getDataObject().
- Specified by:
cleanup
in interface DataProvider