Package org.eclipse.emf.ecore

Examples of org.eclipse.emf.ecore.EOperation$Internal$InvocationDelegate


  {
    Class<?> containerClass = eOperation.getEContainingClass().getInstanceClass();
    if (containerClass == null)
    {
      EClass eClass = eClass();
      EOperation override = eClass.getOverride(eOperation);
      return eClass.getOperationID(override != null ? override : eOperation);
    }
    else
    {
      assert eClass().getEAllOperations().contains(eOperation) : "The operation '" + eOperation.getName() + "' is not a valid operation";
View Full Code Here


    }
  }

  public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException
  {
    EOperation eOperation = eClass().getEOperation(operationID);
    assert eOperation != null : "Invalid operationID: " + operationID;
     
    return eInvocationDelegate(eOperation).dynamicInvoke(this, arguments);
  }
View Full Code Here

    }
  }
 
  protected EOperation addEOperation(EClass owner, EClassifier type, String name)
  {
    EOperation o = ecoreFactory.createEOperation();
    initEOperation(o, type, name);
    owner.getEOperations().add(o);
    return o;
  }
View Full Code Here

    return o;
  }

  protected EOperation addEOperation(EClass owner, EClassifier type, String name, int lowerBound, int upperBound)
  {
    EOperation o = ecoreFactory.createEOperation();
    initEOperation(o, type, name, lowerBound, upperBound);
    owner.getEOperations().add(o);
    return o;
  }
View Full Code Here

    return o;
  }

  protected EOperation addEOperation(EClass owner, EClassifier type, String name, int lowerBound, int upperBound, boolean isUnique, boolean isOrdered)
  {
    EOperation o = ecoreFactory.createEOperation();
    initEOperation(o, type, name, lowerBound, upperBound, isUnique, isOrdered);
    owner.getEOperations().add(o);
    return o;
  }
View Full Code Here

      annotation.setSource(EMOFExtendedMetaData.EMOF_PACKAGE_NS_URI_2_0);
      return annotation;
    }
    else if (EcorePackage.Literals.EOPERATION == type)
    {
      EOperation eOperation = EcoreFactory.eINSTANCE.createEOperation();
      eOperation.setLowerBound(1);
      eOperation.setOrdered(false);
      return eOperation;
    }
    else if (EcorePackage.Literals.EPARAMETER == type)
    {
      EParameter eParameter = EcoreFactory.eINSTANCE.createEParameter();
View Full Code Here

    initEReference(getEClass_EIDAttribute(), this.getEAttribute(), null, "eIDAttribute", null, 0, 1, EClass.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
    initEReference(getEClass_EStructuralFeatures(), this.getEStructuralFeature(), this.getEStructuralFeature_EContainingClass(), "eStructuralFeatures", null, 0, -1, EClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getEClass_EGenericSuperTypes(), this.getEGenericType(), null, "eGenericSuperTypes", null, 0, -1, EClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getEClass_EAllGenericSuperTypes(), this.getEGenericType(), null, "eAllGenericSuperTypes", null, 0, -1, EClass.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);

    EOperation op = initEOperation(getEClass__IsSuperTypeOf__EClass(), this.getEBoolean(), "isSuperTypeOf", 0, 1, IS_UNIQUE, IS_ORDERED);
    addEParameter(op, this.getEClass(), "someClass", 0, 1, IS_UNIQUE, IS_ORDERED);

    initEOperation(getEClass__GetFeatureCount(), this.getEInt(), "getFeatureCount", 0, 1, IS_UNIQUE, IS_ORDERED);

    op = initEOperation(getEClass__GetEStructuralFeature__int(), this.getEStructuralFeature(), "getEStructuralFeature", 0, 1, IS_UNIQUE, IS_ORDERED);
View Full Code Here

  @Override
  public int eDerivedOperationID(EOperation eOperation)
  {
    EClass eClass = eClass();
    EOperation override = eClass.getOverride(eOperation);
    return eClass.getOperationID(override != null ? override : eOperation);
  }
View Full Code Here

  }

  @Override
  public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException
  {
    EOperation eOperation = eClass().getEOperation(operationID);
    assert eOperation != null : "Invalid operationID: " + operationID;
     
    return eInvocationDelegate(eOperation).dynamicInvoke(this, arguments);
  }
View Full Code Here

   */
  static public void addEOperationToEClass(String name,
      EClassifier eReturnType, List<EParameter> parameters, EClass eClass) {
    Collection<EParameter> c = new ArrayList<EParameter>();
    c = parameters;
    EOperation eOperation = theCoreFactory.createEOperation();
    eOperation.setName(name);
    eOperation.setEType(eReturnType);
    eOperation.getEParameters().addAll(c);
    eClass.getEOperations().add(eOperation);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.emf.ecore.EOperation$Internal$InvocationDelegate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.