Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 255469 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/emf/ecore/impl/DynamicEObjectImpl.java (+24 lines)
Lines 17-22 Link Here
17
package org.eclipse.emf.ecore.impl;
17
package org.eclipse.emf.ecore.impl;
18
18
19
19
20
import java.lang.reflect.InvocationTargetException;
21
20
import org.eclipse.emf.common.util.BasicEMap;
22
import org.eclipse.emf.common.util.BasicEMap;
21
import org.eclipse.emf.common.util.EList;
23
import org.eclipse.emf.common.util.EList;
22
import org.eclipse.emf.common.util.URI;
24
import org.eclipse.emf.common.util.URI;
Lines 265-270 Link Here
265
  }
267
  }
266
268
267
  @Override
269
  @Override
270
  public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException
271
  {
272
    EOperation eOperation = eClass().getEOperation(operationID);
273
    assert eOperation != null : "Invalid operationID: " + operationID;
274
275
    return eInvocationDelegate(eOperation).dynamicInvoke(this, arguments);
276
  }
277
  
278
  @Override
279
  public Object eInvoke(EOperation eOperation, EList<?> arguments) throws InvocationTargetException {
280
    int operationID = eDerivedOperationID(eOperation);
281
    if (operationID >= 0)
282
    {
283
      return eInvoke(operationID, arguments);
284
    }
285
    else
286
    {
287
      throw new IllegalArgumentException("The operation '" + eOperation.getName() + "' is not a valid operation");
288
    }
289
  }
290
291
  @Override
268
  protected EClass eDynamicClass()
292
  protected EClass eDynamicClass()
269
  {
293
  {
270
    return eClass;
294
    return eClass;

Return to bug 255469