org.nasdanika.models.source.impl.PositionImpl Maven / Gradle / Ivy
The newest version!
/**
*/
package org.nasdanika.models.source.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.nasdanika.models.source.Position;
import org.nasdanika.models.source.SourcePackage;
/**
*
* An implementation of the model object 'Position'.
*
*
* The following features are implemented:
*
*
* - {@link org.nasdanika.models.source.impl.PositionImpl#getLine Line}
* - {@link org.nasdanika.models.source.impl.PositionImpl#getColumn Column}
* - {@link org.nasdanika.models.source.impl.PositionImpl#isExclusive Exclusive}
*
*
* @generated
*/
public class PositionImpl extends MinimalEObjectImpl.Container implements Position {
/**
* The default value of the '{@link #getLine() Line}' attribute.
*
*
* @see #getLine()
* @generated
* @ordered
*/
protected static final int LINE_EDEFAULT = 0;
/**
* The default value of the '{@link #getColumn() Column}' attribute.
*
*
* @see #getColumn()
* @generated
* @ordered
*/
protected static final int COLUMN_EDEFAULT = 0;
/**
* The default value of the '{@link #isExclusive() Exclusive}' attribute.
*
*
* @see #isExclusive()
* @generated
* @ordered
*/
protected static final boolean EXCLUSIVE_EDEFAULT = false;
/**
*
*
* @generated
*/
protected PositionImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return SourcePackage.Literals.POSITION;
}
/**
*
*
* @generated
*/
@Override
protected int eStaticFeatureCount() {
return 0;
}
/**
*
*
* @generated
*/
@Override
public int getLine() {
return (Integer)eDynamicGet(SourcePackage.POSITION__LINE, SourcePackage.Literals.POSITION__LINE, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setLine(int newLine) {
eDynamicSet(SourcePackage.POSITION__LINE, SourcePackage.Literals.POSITION__LINE, newLine);
}
/**
*
*
* @generated
*/
@Override
public int getColumn() {
return (Integer)eDynamicGet(SourcePackage.POSITION__COLUMN, SourcePackage.Literals.POSITION__COLUMN, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setColumn(int newColumn) {
eDynamicSet(SourcePackage.POSITION__COLUMN, SourcePackage.Literals.POSITION__COLUMN, newColumn);
}
/**
*
*
* @generated
*/
@Override
public boolean isExclusive() {
return (Boolean)eDynamicGet(SourcePackage.POSITION__EXCLUSIVE, SourcePackage.Literals.POSITION__EXCLUSIVE, true, true);
}
/**
*
*
* @generated
*/
@Override
public void setExclusive(boolean newExclusive) {
eDynamicSet(SourcePackage.POSITION__EXCLUSIVE, SourcePackage.Literals.POSITION__EXCLUSIVE, newExclusive);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SourcePackage.POSITION__LINE:
return getLine();
case SourcePackage.POSITION__COLUMN:
return getColumn();
case SourcePackage.POSITION__EXCLUSIVE:
return isExclusive();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case SourcePackage.POSITION__LINE:
setLine((Integer)newValue);
return;
case SourcePackage.POSITION__COLUMN:
setColumn((Integer)newValue);
return;
case SourcePackage.POSITION__EXCLUSIVE:
setExclusive((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SourcePackage.POSITION__LINE:
setLine(LINE_EDEFAULT);
return;
case SourcePackage.POSITION__COLUMN:
setColumn(COLUMN_EDEFAULT);
return;
case SourcePackage.POSITION__EXCLUSIVE:
setExclusive(EXCLUSIVE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SourcePackage.POSITION__LINE:
return getLine() != LINE_EDEFAULT;
case SourcePackage.POSITION__COLUMN:
return getColumn() != COLUMN_EDEFAULT;
case SourcePackage.POSITION__EXCLUSIVE:
return isExclusive() != EXCLUSIVE_EDEFAULT;
}
return super.eIsSet(featureID);
}
} //PositionImpl