|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.m2mi.MethodInvoker
public abstract class MethodInvoker
Class MethodInvoker is the abstract base class for all synthesized method invoker classes in M2MI.
There are two levels in the method invoker class hierarchy:
A method invoker provides fields for storing the argument values. A method invoker provides a method for invoking the target method on a given target object, passing in the argument values from the method invoker's fields.
A method invoker is not itself serializable. However, a method invoker does provide methods to write its argument values to an object output stream and read its argument values from an object input stream.
Constructor Summary | |
---|---|
MethodInvoker()
Construct a new method invoker. |
Method Summary | |
---|---|
abstract void |
invoke(Object theTargetObject)
Perform the invocation specified by this method invoker on the given target object. |
void |
read(ObjectInput theObjectInput)
Read this method invoker's argument values from the given object input stream. |
void |
write(ObjectOutput theObjectOutput)
Write this method invoker's argument values to the given object output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MethodInvoker()
Method Detail |
---|
public void write(ObjectOutput theObjectOutput) throws IOException
The base class implementation does nothing. If the target method has one or more argument values, a subclass must override write() to write the argument values.
theObjectOutput
- Object output stream to write to.
IOException
- Thrown if an I/O error occurred.public void read(ObjectInput theObjectInput) throws IOException, ClassNotFoundException
The base class implementation does nothing. If the target method has one or more argument values, a subclass must override read() to read the argument values.
theObjectInput
- Object input stream to read from.
IOException
- Thrown if an I/O error occurred.
ClassNotFoundException
- Thrown if the class could not be found for an object being read.public abstract void invoke(Object theTargetObject)
A subclass must override invoke().
theTargetObject
- Target object.
NullPointerException
- (unchecked exception) Thrown if theTargetObject is null.
ClassCastException
- (unchecked exception) Thrown if theTargetObject is not an
instance of this method invoker's target interface.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |