private void init() {
    BasicEList<EStructuralFeature> contains = new UniqueEList<EStructuralFeature>(this.size);
    BasicEList<EStructuralFeature> crossRefs = new UniqueEList<EStructuralFeature>(this.size);

    for (int i = 0; i < this.size; ++i) {
      EStructuralFeature eFeature = (EStructuralFeature) this.data[i];
      if (eFeature instanceof EReference) {
        EReference eReference = (EReference) eFeature;

        if (eReference.isContainment()) {
          contains.add(eReference);
        } else if (!eReference.isContainer()) {
          crossRefs.add(eReference);
        }
      }
    }
    contains.shrink();
    crossRefs.shrink();

    this.containments = new EStructuralFeature[contains.size()];
    this.crossReferences = new EStructuralFeature[crossRefs.size()];
    int i = 0;
    for (EStructuralFeature feature : contains) {
      this.containments[i++] = feature;
    }
    i = 0;
    for (EStructuralFeature feature : crossRefs) {
      this.crossReferences[i++] = feature;
    }
  }
示例#2
0
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  * This is specialized for the more specific element type known in this context.
  *
  * @generated
  */
 @Override
 public Link[] getValues() {
   if (values == null || values.isEmpty()) return VALUES_EEMPTY_ARRAY;
   BasicEList<Link> list = (BasicEList<Link>) values;
   list.shrink();
   return (Link[]) list.data();
 }