Java 类org.eclipse.emf.ecore.util.DelegatingEcoreEList 实例源码

项目:xtext-extras    文件:JvmEnumerationTypeImplCustom.java   
@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;
}