/******************************************************************************* | |
* Copyright (c) 2012, 2019 IBM Corporation and others. | |
* This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License 2.0 | |
* which accompanies this distribution, and is available at | |
* https://www.eclipse.org/legal/epl-2.0/ | |
* | |
* SPDX-License-Identifier: EPL-2.0 | |
* | |
* Contributors: | |
* IBM Corporation - initial API and implementation | |
*******************************************************************************/ | |
/** | |
*/ | |
package org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm; | |
import org.eclipse.emf.common.notify.Notification; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.emf.ecore.impl.ENotificationImpl; | |
import org.eclipse.jpt.common.core.resource.xml.EBaseObject; | |
import org.eclipse.jpt.common.core.resource.xml.EBaseObjectImpl; | |
/** | |
* <!-- begin-user-doc --> | |
* A representation of the model object '<em><b>EXml Class Extractor</b></em>'. | |
* <!-- end-user-doc --> | |
* | |
* <p> | |
* The following features are supported: | |
* <ul> | |
* <li>{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlClassExtractor#getClassName <em>Class Name</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlClassExtractor() | |
* @model kind="class" | |
* @extends EBaseObject | |
* @generated | |
*/ | |
public class EXmlClassExtractor extends EBaseObjectImpl implements EBaseObject | |
{ | |
/** | |
* The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getClassName() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String CLASS_NAME_EDEFAULT = null; | |
/** | |
* The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getClassName() | |
* @generated | |
* @ordered | |
*/ | |
protected String className = CLASS_NAME_EDEFAULT; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected EXmlClassExtractor() | |
{ | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() | |
{ | |
return OxmPackage.Literals.EXML_CLASS_EXTRACTOR; | |
} | |
/** | |
* Returns the value of the '<em><b>Class Name</b></em>' attribute. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of the '<em>Class Name</em>' attribute isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @return the value of the '<em>Class Name</em>' attribute. | |
* @see #setClassName(String) | |
* @see org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.OxmPackage#getEXmlClassExtractor_ClassName() | |
* @model | |
* @generated | |
*/ | |
public String getClassName() | |
{ | |
return className; | |
} | |
/** | |
* Sets the value of the '{@link org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm.EXmlClassExtractor#getClassName <em>Class Name</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @param value the new value of the '<em>Class Name</em>' attribute. | |
* @see #getClassName() | |
* @generated | |
*/ | |
public void setClassName(String newClassName) | |
{ | |
String oldClassName = className; | |
className = newClassName; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, OxmPackage.EXML_CLASS_EXTRACTOR__CLASS_NAME, oldClassName, className)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) | |
{ | |
switch (featureID) | |
{ | |
case OxmPackage.EXML_CLASS_EXTRACTOR__CLASS_NAME: | |
return getClassName(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) | |
{ | |
switch (featureID) | |
{ | |
case OxmPackage.EXML_CLASS_EXTRACTOR__CLASS_NAME: | |
setClassName((String)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) | |
{ | |
switch (featureID) | |
{ | |
case OxmPackage.EXML_CLASS_EXTRACTOR__CLASS_NAME: | |
setClassName(CLASS_NAME_EDEFAULT); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) | |
{ | |
switch (featureID) | |
{ | |
case OxmPackage.EXML_CLASS_EXTRACTOR__CLASS_NAME: | |
return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className); | |
} | |
return super.eIsSet(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public String toString() | |
{ | |
if (eIsProxy()) return super.toString(); | |
StringBuffer result = new StringBuffer(super.toString()); | |
result.append(" (className: "); | |
result.append(className); | |
result.append(')'); | |
return result.toString(); | |
} | |
} // EXmlClassExtractor |