org.eclipse.emf.ecore.util
Class BasicInvocationDelegate
java.lang.Object
org.eclipse.emf.ecore.util.BasicInvocationDelegate
- All Implemented Interfaces:
- EOperation.Internal.InvocationDelegate
public class BasicInvocationDelegate
- extends java.lang.Object
- implements EOperation.Internal.InvocationDelegate
A basic implementation of the dynamic operation-invocation delegate API. In
fact, it is so basic that it isn't much an implementation at all, but merely
throws UnsupportedOperationException
on every invocation, except for
the operations defined for the EObject
class.
Subclasses should override the dynamicInvoke(InternalEObject, EList)
method to not do that.
- Since:
- 2.6
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
eOperation
protected EOperation eOperation
BasicInvocationDelegate
public BasicInvocationDelegate(EOperation operation)
- Initializes me with the operation that delegates to me.
- Parameters:
operation
- my operation
dynamicInvoke
public java.lang.Object dynamicInvoke(InternalEObject target,
EList<?> arguments)
throws java.lang.reflect.InvocationTargetException
- Description copied from interface:
EOperation.Internal.InvocationDelegate
- Invokes the operation behaviour for the specified target
object.
- Specified by:
dynamicInvoke
in interface EOperation.Internal.InvocationDelegate
- Parameters:
target
- the object on which to invoke the operationarguments
- the arguments for the operation parameters (an
empty list if the operation has no parameters)
- Returns:
- the operation's return result, or
null
if it is
a void operation
- Throws:
java.lang.reflect.InvocationTargetException
- in case of failure to execute the
operation behaviour, usually because of an exception