当前位置: 首页>>代码示例>>Java>>正文


Java ECollections.unmodifiableEList方法代码示例

本文整理汇总了Java中org.eclipse.emf.common.util.ECollections.unmodifiableEList方法的典型用法代码示例。如果您正苦于以下问题:Java ECollections.unmodifiableEList方法的具体用法?Java ECollections.unmodifiableEList怎么用?Java ECollections.unmodifiableEList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.emf.common.util.ECollections的用法示例。


在下文中一共展示了ECollections.unmodifiableEList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getStructuralMembers

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EList<TStructMember> getStructuralMembers() {
	EList<TStructMember> _xifexpression = null;
	TStructuralType _structuralType = this.getStructuralType();
	boolean _tripleNotEquals = (_structuralType != null);
	if (_tripleNotEquals) {
		_xifexpression = this.getStructuralType().getOwnedMembers();
	}
	else {
		EList<TStructMember> _xifexpression_1 = null;
		boolean _isEmpty = this.getAstStructuralMembers().isEmpty();
		boolean _not = (!_isEmpty);
		if (_not) {
			_xifexpression_1 = this.getAstStructuralMembers();
		}
		else {
			_xifexpression_1 = this.getGenStructuralMembers();
		}
		_xifexpression = _xifexpression_1;
	}
	return ECollections.<TStructMember>unmodifiableEList(_xifexpression);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:27,代码来源:ParameterizedTypeRefStructuralImpl.java

示例2: getValues

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
@Override
public EList<JvmAnnotationValue> getValues() {
	EList<JvmAnnotationValue> explicitValues = getExplicitValues();
	List<JvmOperation> operations = Lists.newArrayList(getAnnotation().getDeclaredOperations());
	if (operations.size() <= explicitValues.size()) {
		return ECollections.unmodifiableEList(explicitValues);
	}
	Set<JvmOperation> seenOperations = Sets.newHashSetWithExpectedSize(operations.size());
	BasicEList<JvmAnnotationValue> result = new BasicEList<JvmAnnotationValue>(operations.size());
	for(JvmAnnotationValue value: explicitValues) {
		seenOperations.add(value.getOperation());
		result.add(value);
	}
	for(JvmOperation operation: operations) {
		if (seenOperations.add(operation)) {
			JvmAnnotationValue defaultValue = operation.getDefaultValue();
			if (defaultValue != null) {
				result.add(defaultValue);
			}
		}
	}
	return ECollections.unmodifiableEList(result);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:24,代码来源:JvmAnnotationReferenceImplCustom.java

示例3: eContents

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
@Override
public EList<EObject> eContents() {
  // @Optimize: maybe use an iterator?

  List<EObject> contents = new ArrayList<>();

  for (EReference ref : eClass().getEAllContainments()) {
    if (ref.isMany()) {
      @SuppressWarnings("unchecked")
      List<EObject> list = (List<EObject>) eGet(ref);
      if (list != null) {
        for (EObject o : list) {
          contents.add(virtualizer.getVirtual(o));
        }
      }
    } else {
      EObject value = (EObject) eGet(ref);
      if (value != null) {
        contents.add(virtualizer.getVirtual(value));
      }
    }
  }

  return ECollections.unmodifiableEList(contents);
}
 
开发者ID:atlanmod,项目名称:emfviews,代码行数:26,代码来源:VirtualEObject.java

示例4: buildVirtualContents

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
private EList<EObject> buildVirtualContents() {
  List<EObject> contents = new ArrayList<>();

  // The order of packages in the virtual contents matters. We use the order
  // specified by the contributing models, and the virtual package is last.
  for (EPackage p : contributingEPackages) {
    contents.add((EObject) virtualResourceSet.getPackageRegistry().get(p.getNsURI()));
  }

  // The virtual package is not included if there are no new concepts.
  if (virtualPackage != null) {
    contents.add(getVirtual(virtualPackage));
  }

  return ECollections.unmodifiableEList(contents);
}
 
开发者ID:atlanmod,项目名称:emfviews,代码行数:17,代码来源:Viewpoint.java

示例5: getKnownInputs

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated NOT
 */
@Override
public EList<InputSpecification> getKnownInputs ()
{
    if ( this.knownInputs == null )
    {
        final BasicEList<InputSpecification> inputs = ECollections.newBasicEList ();
        inputs.add ( Components.createInput ( "input" ) );
        this.knownInputs = ECollections.unmodifiableEList ( inputs );
    }
    return this.knownInputs;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:AverageModuleImpl.java

示例6: getKnownOutputs

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated NOT
 */
@Override
public EList<OutputSpecification> getKnownOutputs ()
{
    if ( this.knownOutputs == null )
    {
        final BasicEList<OutputSpecification> outputs = ECollections.newBasicEList ();
        for ( final AverageReferenceType type : AverageReferenceType.values () )
        {
            outputs.add ( Components.createOutput ( type.getLiteral (), DataType.FLOAT ) );
        }
        this.knownOutputs = ECollections.unmodifiableEList ( outputs );
    }
    return this.knownOutputs;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:21,代码来源:AverageModuleImpl.java

示例7: getKnownOutputs

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated NOT
 */
@Override
public EList<OutputSpecification> getKnownOutputs ()
{
    if ( this.knownOutputs == null )
    {
        final BasicEList<OutputSpecification> outputs = ECollections.newBasicEList ();
        outputs.add ( Components.createOutput ( "output", null ) );
        this.knownOutputs = ECollections.unmodifiableEList ( outputs );
    }
    return this.knownOutputs;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:FormulaModuleImpl.java

示例8: getKnownInputs

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 *
 * @generated NOT
 */
@Override
public EList<InputSpecification> getKnownInputs ()
{
    if ( this.knownInputs == null )
    {
        final BasicEList<InputSpecification> inputs = ECollections.newBasicEList ();
        inputs.add ( Components.createInput ( "input" ) );
        this.knownInputs = ECollections.unmodifiableEList ( inputs );
    }
    return this.knownInputs;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:MovingAverageModuleImpl.java

示例9: getKnownOutputs

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 *
 * @generated NOT
 */
@Override
public EList<OutputSpecification> getKnownOutputs ()
{
    if ( this.knownOutputs == null )
    {
        final BasicEList<OutputSpecification> outputs = ECollections.newBasicEList ();
        for ( final MovingAverageReferenceType type : MovingAverageReferenceType.values () )
        {
            outputs.add ( Components.createOutput ( type.getLiteral (), DataType.FLOAT ) );
        }
        this.knownOutputs = ECollections.unmodifiableEList ( outputs );
    }
    return this.knownOutputs;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:21,代码来源:MovingAverageModuleImpl.java

示例10: getEAllSuperTypes

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
@Override
public EList<EClass> getEAllSuperTypes() {
  List<EClass> sups = new ArrayList<>();

  for (EClass sup : getESuperTypes()) {
    sups.addAll(sup.getEAllSuperTypes());
  }

  sups.addAll(getESuperTypes());

  return ECollections.unmodifiableEList(sups);
}
 
开发者ID:atlanmod,项目名称:emfviews,代码行数:13,代码来源:VirtualEClass.java

示例11: getEAttributes

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
@Override
public EList<EAttribute> getEAttributes() {
  // @Optimize: could use a lazy iterator
  List<EAttribute> attrs = new ArrayList<>();

  for (EStructuralFeature f : getEStructuralFeatures()) {
    if (f instanceof EAttribute) {
      attrs.add((EAttribute) f);
    }
  }

  return ECollections.unmodifiableEList(attrs);
}
 
开发者ID:atlanmod,项目名称:emfviews,代码行数:14,代码来源:VirtualEClass.java

示例12: getEAllAttributes

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
@Override
public EList<EAttribute> getEAllAttributes() {
  // @Optimize: could use a lazy iterator
  List<EAttribute> attrs = new ArrayList<>();

  for (EStructuralFeature f : getEAllStructuralFeatures()) {
    if (f instanceof EAttribute) {
      attrs.add((EAttribute) f);
    }
  }

  return ECollections.unmodifiableEList(attrs);
}
 
开发者ID:atlanmod,项目名称:emfviews,代码行数:14,代码来源:VirtualEClass.java

示例13: getEReferences

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
@Override
public EList<EReference> getEReferences() {
  // @Optimize: could use a layz iterator
  List<EReference> refs = new ArrayList<>();

  for (EStructuralFeature f : getEStructuralFeatures()) {
    if (f instanceof EReference) {
      refs.add((EReference) f);
    }
  }

  return ECollections.unmodifiableEList(refs);
}
 
开发者ID:atlanmod,项目名称:emfviews,代码行数:14,代码来源:VirtualEClass.java

示例14: getEAllReferences

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
@Override
public EList<EReference> getEAllReferences() {
  // @Optimize: could use a lazy iterator
  List<EReference> references = new ArrayList<>();

  for (EStructuralFeature f : getEAllStructuralFeatures()) {
    if (f instanceof EReference) {
      references.add((EReference) f);
    }
  }

  return ECollections.unmodifiableEList(references);
}
 
开发者ID:atlanmod,项目名称:emfviews,代码行数:14,代码来源:VirtualEClass.java

示例15: getEAllContainments

import org.eclipse.emf.common.util.ECollections; //导入方法依赖的package包/类
@Override
public EList<EReference> getEAllContainments() {
  // @Optimize: could use a lazy iterator
  List<EReference> containments = new ArrayList<>();

  for (EReference ref : getEAllReferences()) {
    if (ref.isContainment()) {
      containments.add(ref);
    }
  }

  return ECollections.unmodifiableEList(containments);
}
 
开发者ID:atlanmod,项目名称:emfviews,代码行数:14,代码来源:VirtualEClass.java


注:本文中的org.eclipse.emf.common.util.ECollections.unmodifiableEList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。