Examples of EList


Examples of erjang.EList

  private void visit_function(ModuleVisitor v, ETuple fun) {

    EAtom name = (EAtom) fun.elm(2);
    int ary = fun.elm(3).asInt();
    int entry = fun.elm(4).asInt();
    EList insns = (EList) fun.elm(5);

    FunctionVisitor fv = v.visitFunction(name, ary, entry);

    visit_insns(insns, fv);
View Full Code Here

Examples of erjang.EList

      this.map_seq = map_seq;
    }
   
    @Override
    public ESeq cons(EObject h) {
      return new EList(h, this);
    }
View Full Code Here

Examples of erjang.EList

    this.self = self;
  }

  @Override
  public ESeq cons(EObject h) {
    return new EList(h, this);
  }
View Full Code Here

Examples of erjang.EList

    this.self = self;
  }

  @Override
  public ESeq cons(EObject h) {
    return new EList(h, this);
  }
View Full Code Here

Examples of erjang.EList

    this.self = self;
  }

  @Override
  public ESeq cons(EObject h) {
    return new EList(h, this);
  }
View Full Code Here

Examples of erjang.EList

    if ((s = h.testSmall()) != null) {
      if ((s.value & 0xff) == s.value) {
        return new EStringList((byte) s.value, this);
      }
    }
    return new EList(h, this);
  }
View Full Code Here

Examples of erjang.EList

      this.seq = s;
    }
   
    @Override
    public ESeq cons(EObject h) {
      return new EList(h, this);
    }
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

     * @return concatenated string
     */
    public static String getComment(final Element element)
    {
        String commentString = "";
        EList comments = element.getOwnedComments();

        for (Iterator iterator = comments.iterator(); iterator.hasNext();)
        {
            final Comment comment = (Comment)iterator.next();
            if (!commentString.equalsIgnoreCase(""))
            {
                commentString = commentString + "\n\n";
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public List getChangedDataObjects()
  {
    EList result = new UniqueEList.FastCompare(getDeletedObjects());
    result.addAll(getObjectsToDetach());
    for (Iterator i = getObjectChanges().iterator(); i.hasNext(); )
    {
      Map.Entry entry = (Map.Entry)i.next();
      result.add(entry.getKey());
    }
    return result;
  }
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

    EAnnotation eannot = aEClass.getEAnnotation("http://uima.apache.org");
    if (eannot != null) {
      type.setDescription((String) eannot.getDetails().get("description"));
    }
    // set supertype
    EList supertypes = aEClass.getESuperTypes();
    if (supertypes.isEmpty()) // supertype not defined in the Ecore model
    {
      if (aOptions.get(OPTION_CREATE_ANNOTATION_SUBTYPES) == Boolean.FALSE) {
        type.setSupertypeName(CAS.TYPE_NAME_TOP);
      } else {
        // if this class has "begin" and "end" attributes of type EInt, make it a subtype of
        // annotation
        EStructuralFeature begin = aEClass.getEStructuralFeature("begin");
        EStructuralFeature end = aEClass.getEStructuralFeature("end");
        if (begin != null && end != null && begin.getEType() == EcorePackage.eINSTANCE.getEInt()
                && end.getEType() == EcorePackage.eINSTANCE.getEInt()) {
          type.setSupertypeName(CAS.TYPE_NAME_ANNOTATION);
        } else {
          type.setSupertypeName(CAS.TYPE_NAME_TOP);
        }
      }
    } else {
      EClass supertype = (EClass) supertypes.get(0);
      // if the supertype is EObject, translate that to uima.cas.TOP
      if (supertype.equals(EcorePackage.eINSTANCE.getEObject())) {
        type.setSupertypeName(CAS.TYPE_NAME_TOP);
      }
      // otherwise translate the name according to our conventions
      String uimaSupertypeName = getUimaTypeName(supertype, false, aOptions);
      type.setSupertypeName(uimaSupertypeName);

      // if there are multiple supertypes, the first one is arbitrarily chosen
      // as the single supertype for the UIMA type. Other features are copied-down.
      if (supertypes.size() > 1) {
        System.err.println("Warning: EClass " + aEClass.getName()
                + " defines multiple supertypes. " + "The UIMA supertype will be "
                + type.getSupertypeName()
                + "; features inherited from other supertypes will be copied down.");
      }
    }
    // set features
    EList eFeatures = aEClass.getEStructuralFeatures();
    Iterator iter = eFeatures.iterator();
    List uimaFeatures = new ArrayList();
    while (iter.hasNext()) {
      EStructuralFeature eFeat = (EStructuralFeature) iter.next();
      FeatureDescription uimaFeat = eStructuralFeature2UimaFeature(eFeat, aOptions);
      uimaFeatures.add(uimaFeat);
    }
    // copy down features from additional supertypes
    for (int i = 1; i < supertypes.size(); i++) {
      EClass copyFrom = (EClass) supertypes.get(i);
      EList copyFeatures = copyFrom.getEStructuralFeatures();
      Iterator iter2 = copyFeatures.iterator();
      while (iter2.hasNext()) {
        EStructuralFeature eFeat = (EStructuralFeature) iter2.next();
        // do not copy if this feature is a duplicate of one defined on the class
        // or inherited from its primary supertype
        EList locallyDefinedFeatures = aEClass.getEStructuralFeatures();
        EList firstSupertypesFeatures = ((EClass) supertypes.get(0)).getEAllStructuralFeatures();
        if (!containsNamedElement(locallyDefinedFeatures, eFeat.getName())
                && !containsNamedElement(firstSupertypesFeatures, eFeat.getName())) {
          FeatureDescription uimaFeat = eStructuralFeature2UimaFeature(eFeat, aOptions);
          uimaFeatures.add(uimaFeat);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.