Java Code Examples for org.eclipse.emf.common.util.ECollections#unmodifiableEList()

The following examples show how to use org.eclipse.emf.common.util.ECollections#unmodifiableEList() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ThisTypeRefStructuralImpl.java    From n4js with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
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);
}
 
Example 2
Source File: VersionedParameterizedTypeRefStructuralImpl.java    From n4js with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
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);
}
 
Example 3
Source File: BoundThisTypeRefImpl.java    From n4js with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
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);
}
 
Example 4
Source File: StructuralTypeRefImpl.java    From n4js with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
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);
}
 
Example 5
Source File: ParameterizedTypeRefStructural_IMImpl.java    From n4js with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
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);
}
 
Example 6
Source File: VersionedParameterizedTypeRefStructural_IMImpl.java    From n4js with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
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);
}
 
Example 7
Source File: ParameterizedTypeRefStructuralImpl.java    From n4js with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
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);
}
 
Example 8
Source File: JvmAnnotationReferenceImplCustom.java    From xtext-extras with Eclipse Public License 2.0 6 votes vote down vote up
@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);
}
 
Example 9
Source File: EventDefinitionImpl.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public EList<Annotation> getAnnotations() {
	EList<Annotation> result = new BasicEList<Annotation>();
	result.addAll(super.getAnnotations());
	if(getAnnotationInfo() != null) {
		result.addAll(getAnnotationInfo().getAnnotations());
	}
	return ECollections.unmodifiableEList(result);
}
 
Example 10
Source File: VariableDefinitionImpl.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public EList<Annotation> getAnnotations() {
	EList<Annotation> result = new BasicEList<Annotation>();
	result.addAll(super.getAnnotations());
	if(getAnnotationInfo() != null) {
		result.addAll(getAnnotationInfo().getAnnotations());
	}
	return ECollections.unmodifiableEList(result);
}
 
Example 11
Source File: TypeAliasDefinitionImpl.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public EList<Annotation> getAnnotations() {
	EList<Annotation> result = new BasicEList<Annotation>();
	result.addAll(super.getAnnotations());
	if(getAnnotationInfo() != null) {
		result.addAll(getAnnotationInfo().getAnnotations());
	}
	return ECollections.unmodifiableEList(result);
}
 
Example 12
Source File: OperationDefinitionImpl.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public EList<Annotation> getAnnotations() {
	EList<Annotation> result = new BasicEList<Annotation>();
	result.addAll(super.getAnnotations());
	if(getAnnotationInfo() != null) {
		result.addAll(getAnnotationInfo().getAnnotations());
	}
	return ECollections.unmodifiableEList(result);
}
 
Example 13
Source File: MovingAverageModuleImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- 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;
}
 
Example 14
Source File: MovingAverageModuleImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- 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;
}
 
Example 15
Source File: FormulaModuleImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- 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;
}
 
Example 16
Source File: AverageModuleImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- 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;
}
 
Example 17
Source File: AverageModuleImpl.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- 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;
}
 
Example 18
Source File: JSONArrayImpl.java    From n4js with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public EList<EObject> getChildren() {
	return ECollections.<EObject>unmodifiableEList(this.getElements());
}
 
Example 19
Source File: JSONObjectImpl.java    From n4js with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public EList<EObject> getChildren() {
	return ECollections.<EObject>unmodifiableEList(this.getNameValuePairs());
}