private void checkTypeIsEClass(TypeRef type) { if (type != null) { EClassifier classifier = type.getClassifier(); if (classifier != null && !classifier.eIsProxy()) { if (!(classifier instanceof EClass)) { error( "Type of cross reference must be an EClass.", type, null, ValidationMessageAcceptor.INSIGNIFICANT_INDEX, null); } } } }
public EObject create(EClassifier classifier) { if (classifier == null) throw new NullPointerException("Classifier may not be null."); if (!(classifier instanceof EClass)) throw new IllegalArgumentException("Cannot create instance of datatype '" + classifier.getName() + "'"); EClass clazz = (EClass) classifier; if (clazz.isAbstract() || clazz.isInterface()) throw new IllegalArgumentException("Cannot create instance of abstract class '" + clazz.getName() + "'"); if (classifier.eIsProxy()) throw new IllegalStateException("Unresolved proxy "+((InternalEObject)classifier).eProxyURI()+". Make sure the EPackage has been registered."); return clazz.getEPackage().getEFactoryInstance().create(clazz); }
/** * @generated This field/method will be replaced during code generation */ public EClassifier getComponentTypeGen() { if (componentType != null && componentType.eIsProxy()) { InternalEObject oldComponentType = (InternalEObject)componentType; componentType = (EClassifier)eResolveProxy(oldComponentType); if (componentType != oldComponentType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, JavaRefPackage.ARRAY_TYPE__COMPONENT_TYPE, oldComponentType, componentType)); } } return componentType; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClassifier getEClassifier() { if (eClassifier != null && eClassifier.eIsProxy()) { InternalEObject oldEClassifier = (InternalEObject)eClassifier; eClassifier = (EClassifier)eResolveProxy(oldEClassifier); if (eClassifier != oldEClassifier) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.EGENERIC_TYPE__ECLASSIFIER, oldEClassifier, eClassifier)); } } return eClassifier; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClassifier getEClassifier() { if (eClassifier != null && eClassifier.eIsProxy()) { InternalEObject oldEClassifier = (InternalEObject)eClassifier; eClassifier = (EClassifier)eResolveProxy(oldEClassifier); if (eClassifier != oldEClassifier) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.EGENERIC_TYPE__ECLASSIFIER, oldEClassifier, eClassifier)); } } return eClassifier; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClassifier getClassname() { if (classname != null && classname.eIsProxy()) { InternalEObject oldClassname = (InternalEObject)classname; classname = (EClassifier)eResolveProxy(oldClassname); if (classname != oldClassname) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, PatternLanguagePackage.CLASS_TYPE__CLASSNAME, oldClassname, classname)); } } return classname; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClassifier getClassifier() { if (classifier != null && classifier.eIsProxy()) { InternalEObject oldClassifier = (InternalEObject)classifier; classifier = (EClassifier)eResolveProxy(oldClassifier); if (classifier != oldClassifier) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, XtextPackage.TYPE_REF__CLASSIFIER, oldClassifier, classifier)); } } return classifier; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClassifier getClassname() { if (classname != null && classname.eIsProxy()) { InternalEObject oldClassname = (InternalEObject)classname; classname = (EClassifier)eResolveProxy(oldClassname); if (classname != oldClassname) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EMFPatternLanguagePackage.CLASS_TYPE__CLASSNAME, oldClassname, classname)); } } return classname; }
public IInputKey classifierToInputKey(final EClassifier classifier) { IInputKey _switchResult = null; boolean _matched = false; boolean _eIsProxy = classifier.eIsProxy(); if (_eIsProxy) { _matched=true; _switchResult = BottomTypeKey.INSTANCE; } if (!_matched) { if (classifier instanceof EClass) { _matched=true; _switchResult = new EClassTransitiveInstancesKey(((EClass)classifier)); } } if (!_matched) { if (classifier instanceof EDataType) { _matched=true; _switchResult = new EDataTypeInSlotsKey(((EDataType)classifier)); } } if (!_matched) { _switchResult = BottomTypeKey.INSTANCE; } return _switchResult; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public EClassifier getEType() { if (!isFrozen() && eType != null && eType.eIsProxy()) { InternalEObject oldEType = (InternalEObject)eType; eType = (EClassifier)eResolveProxy(oldEType); if (eType != oldEType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType)); } } return eType; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public EClassifier getEType() { if (!isFrozen() && eType != null && eType.eIsProxy()) { InternalEObject oldEType = (InternalEObject)eType; eType = (EClassifier)eResolveProxy(oldEType); if (eType != oldEType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType)); } } return eType; }
@Override public boolean isValidType(final Type type) { boolean _xblockexpression = false; { if ((type instanceof ClassType)) { final EClassifier classifier = ((ClassType)type).getClassname(); return ((classifier != null) && (!classifier.eIsProxy())); } else { if ((type instanceof ReferenceType)) { final EStructuralFeature feature = ((ReferenceType)type).getRefname(); return ((feature != null) && (!feature.eIsProxy())); } } _xblockexpression = super.isValidType(type); } return _xblockexpression; } }
for (EClassifier cls : possibleClassifiers) { sb.append(" '"); if (cls.eIsProxy()) { sb.append(((BasicEObjectImpl) cls).eProxyURI()); } else {
for (EClassifier cls : possibleClassifiers) { sb.append(" '"); if (cls.eIsProxy()) { sb.append(((BasicEObjectImpl)cls).eProxyURI()); } else {
if (eRawType != null && eRawType.eIsProxy())
if (eRawType != null && eRawType.eIsProxy())