📄 keyoptionimpl.java
字号:
/**
* <copyright>
* </copyright>
*
* $Id: KeyOptionImpl.java 1 2006-06-12 17:37:42Z sxp $
*/
package edu.tsinghua.lumaqq.ecore.option.impl;
import edu.tsinghua.lumaqq.ecore.option.KeyOption;
import edu.tsinghua.lumaqq.ecore.option.OptionPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Key Option</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link edu.tsinghua.lumaqq.ecore.option.impl.KeyOptionImpl#getMessageKey <em>Message Key</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class KeyOptionImpl extends EObjectImpl implements KeyOption {
/**
* The default value of the '{@link #getMessageKey() <em>Message Key</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMessageKey()
* @generated
* @ordered
*/
protected static final String MESSAGE_KEY_EDEFAULT = null;
/**
* The cached value of the '{@link #getMessageKey() <em>Message Key</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMessageKey()
* @generated
* @ordered
*/
protected String messageKey = MESSAGE_KEY_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected KeyOptionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EClass eStaticClass() {
return OptionPackage.Literals.KEY_OPTION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getMessageKey() {
return messageKey;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMessageKey(String newMessageKey) {
String oldMessageKey = messageKey;
messageKey = newMessageKey;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, OptionPackage.KEY_OPTION__MESSAGE_KEY, oldMessageKey, messageKey));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case OptionPackage.KEY_OPTION__MESSAGE_KEY:
return getMessageKey();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case OptionPackage.KEY_OPTION__MESSAGE_KEY:
setMessageKey((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case OptionPackage.KEY_OPTION__MESSAGE_KEY:
setMessageKey(MESSAGE_KEY_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case OptionPackage.KEY_OPTION__MESSAGE_KEY:
return MESSAGE_KEY_EDEFAULT == null ? messageKey != null : !MESSAGE_KEY_EDEFAULT.equals(messageKey);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (messageKey: ");
result.append(messageKey);
result.append(')');
return result.toString();
}
} //KeyOptionImpl
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -