Java Code Examples for org.eclipse.emf.ecore.util.DelegatingEcoreEList

The following are top voted examples for showing how to use org.eclipse.emf.ecore.util.DelegatingEcoreEList. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: xtext-extras   File: JvmEnumerationTypeImplCustom.java   View source code 6 votes vote down vote up
@Override
public EList<JvmEnumerationLiteral> getLiterals() {
	checkPendingInitialization();
	if (literals == null) {
		@SuppressWarnings("serial")
		EObjectResolvingEList<JvmEnumerationLiteral> list = new EObjectResolvingEList<JvmEnumerationLiteral>(
				JvmEnumerationLiteral.class, this, TypesPackage.JVM_ENUMERATION_TYPE__LITERALS) {
			@Override
			protected boolean isNotificationRequired() {
				return false;
			}
		};
		for (JvmMember member : getMembers()) {
			if (member instanceof JvmEnumerationLiteral)
				list.add((JvmEnumerationLiteral) member);
		}
		literals = new DelegatingEcoreEList.UnmodifiableEList<JvmEnumerationLiteral>(this, TypesPackage.Literals.JVM_ENUMERATION_TYPE__LITERALS, list);
	}
	return literals;
}