/**
* generated by Xtext 2.21.0
*/
package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl;
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage;
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PatternElement;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.viatra.query.patternlanguage.emf.vql.Pattern;
/**
*
* An implementation of the model object 'Pattern Element'.
*
*
* The following features are implemented:
*
*
* - {@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl.PatternElementImpl#getPattern Pattern}
*
*
* @generated
*/
public class PatternElementImpl extends PatternEntryImpl implements PatternElement
{
/**
* The cached value of the '{@link #getPattern() Pattern}' reference.
*
*
* @see #getPattern()
* @generated
* @ordered
*/
protected Pattern pattern;
/**
*
*
* @generated
*/
protected PatternElementImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return ApplicationConfigurationPackage.Literals.PATTERN_ELEMENT;
}
/**
*
*
* @generated
*/
@Override
public Pattern getPattern()
{
if (pattern != null && pattern.eIsProxy())
{
InternalEObject oldPattern = (InternalEObject)pattern;
pattern = (Pattern)eResolveProxy(oldPattern);
if (pattern != oldPattern)
{
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ApplicationConfigurationPackage.PATTERN_ELEMENT__PATTERN, oldPattern, pattern));
}
}
return pattern;
}
/**
*
*
* @generated
*/
public Pattern basicGetPattern()
{
return pattern;
}
/**
*
*
* @generated
*/
@Override
public void setPattern(Pattern newPattern)
{
Pattern oldPattern = pattern;
pattern = newPattern;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.PATTERN_ELEMENT__PATTERN, oldPattern, pattern));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PATTERN_ELEMENT__PATTERN:
if (resolve) return getPattern();
return basicGetPattern();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PATTERN_ELEMENT__PATTERN:
setPattern((Pattern)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PATTERN_ELEMENT__PATTERN:
setPattern((Pattern)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case ApplicationConfigurationPackage.PATTERN_ELEMENT__PATTERN:
return pattern != null;
}
return super.eIsSet(featureID);
}
} //PatternElementImpl