org.eclipse.emf.ecore.util
Class BasicInvocationDelegate

java.lang.Object
  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.EOperation.Internal.InvocationDelegate
EOperation.Internal.InvocationDelegate.Factory
 
Field Summary
protected  EOperation eOperation
           
 
Constructor Summary
BasicInvocationDelegate(EOperation operation)
          Initializes me with the operation that delegates to me.
 
Method Summary
 java.lang.Object dynamicInvoke(InternalEObject target, EList<?> arguments)
          Invokes the operation behaviour for the specified target object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eOperation

protected EOperation eOperation
Constructor Detail

BasicInvocationDelegate

public BasicInvocationDelegate(EOperation operation)
Initializes me with the operation that delegates to me.

Parameters:
operation - my operation
Method Detail

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 operation
arguments - 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

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.