/** | |
* | |
* Copyright (c) 2009 Hatha Systems. | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* Nikolai Mansourov (Hatha Systems) - initial API and implementation | |
* Gabriel Barbier (Mia-Software) - minor evolutions for version 1.1 | |
* | |
* $Id$ | |
*/ | |
package org.eclipse.gmt.modisco.omg.kdm.kdm.util; | |
import org.eclipse.emf.common.notify.Adapter; | |
import org.eclipse.emf.common.notify.Notifier; | |
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; | |
import org.eclipse.emf.ecore.EObject; | |
import org.eclipse.gmt.modisco.omg.kdm.core.Element; | |
import org.eclipse.gmt.modisco.omg.kdm.core.ModelElement; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.Annotation; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.Attribute; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.Audit; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.ExtendedValue; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.ExtensionFamily; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.KDMFramework; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.KDMModel; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.KdmPackage; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.Segment; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.Stereotype; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.TagDefinition; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.TaggedRef; | |
import org.eclipse.gmt.modisco.omg.kdm.kdm.TaggedValue; | |
/** | |
* <!-- begin-user-doc --> | |
* The <b>Adapter Factory</b> for the model. | |
* It provides an adapter <code>createXXX</code> method for each class of the model. | |
* <!-- end-user-doc --> | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.KdmPackage | |
* @generated | |
*/ | |
@SuppressWarnings("all") | |
public class KdmAdapterFactory extends AdapterFactoryImpl { | |
/** | |
* The cached model package. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected static KdmPackage modelPackage; | |
/** | |
* Creates an instance of the adapter factory. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public KdmAdapterFactory() { | |
if (KdmAdapterFactory.modelPackage == null) { | |
KdmAdapterFactory.modelPackage = KdmPackage.eINSTANCE; | |
} | |
} | |
/** | |
* Returns whether this factory is applicable for the type of the object. | |
* <!-- begin-user-doc --> | |
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. | |
* <!-- end-user-doc --> | |
* @return whether this factory is applicable for the type of the object. | |
* @generated | |
*/ | |
@Override | |
public boolean isFactoryForType(final Object object) { | |
if (object == KdmAdapterFactory.modelPackage) { | |
return true; | |
} | |
if (object instanceof EObject) { | |
return ((EObject)object).eClass().getEPackage() == KdmAdapterFactory.modelPackage; | |
} | |
return false; | |
} | |
/** | |
* The switch that delegates to the <code>createXXX</code> methods. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected KdmSwitch<Adapter> modelSwitch = | |
new KdmSwitch<Adapter>() { | |
@Override | |
public Adapter caseKDMFramework(final KDMFramework object) { | |
return createKDMFrameworkAdapter(); | |
} | |
@Override | |
public Adapter caseKDMModel(final KDMModel object) { | |
return createKDMModelAdapter(); | |
} | |
@Override | |
public Adapter caseSegment(final Segment object) { | |
return createSegmentAdapter(); | |
} | |
@Override | |
public Adapter caseAudit(final Audit object) { | |
return createAuditAdapter(); | |
} | |
@Override | |
public Adapter caseStereotype(final Stereotype object) { | |
return createStereotypeAdapter(); | |
} | |
@Override | |
public Adapter caseTagDefinition(final TagDefinition object) { | |
return createTagDefinitionAdapter(); | |
} | |
@Override | |
public Adapter caseExtensionFamily(final ExtensionFamily object) { | |
return createExtensionFamilyAdapter(); | |
} | |
@Override | |
public Adapter caseExtendedValue(final ExtendedValue object) { | |
return createExtendedValueAdapter(); | |
} | |
@Override | |
public Adapter caseTaggedValue(final TaggedValue object) { | |
return createTaggedValueAdapter(); | |
} | |
@Override | |
public Adapter caseTaggedRef(final TaggedRef object) { | |
return createTaggedRefAdapter(); | |
} | |
@Override | |
public Adapter caseAttribute(final Attribute object) { | |
return createAttributeAdapter(); | |
} | |
@Override | |
public Adapter caseAnnotation(final Annotation object) { | |
return createAnnotationAdapter(); | |
} | |
@Override | |
public Adapter caseElement(final Element object) { | |
return createElementAdapter(); | |
} | |
@Override | |
public Adapter caseModelElement(final ModelElement object) { | |
return createModelElementAdapter(); | |
} | |
@Override | |
public Adapter defaultCase(final EObject object) { | |
return createEObjectAdapter(); | |
} | |
}; | |
/** | |
* Creates an adapter for the <code>target</code>. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @param target the object to adapt. | |
* @return the adapter for the <code>target</code>. | |
* @generated | |
*/ | |
@Override | |
public Adapter createAdapter(final Notifier target) { | |
return this.modelSwitch.doSwitch((EObject)target); | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.KDMFramework <em>KDM Framework</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.KDMFramework | |
* @generated | |
*/ | |
public Adapter createKDMFrameworkAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.KDMModel <em>KDM Model</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.KDMModel | |
* @generated | |
*/ | |
public Adapter createKDMModelAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.Segment <em>Segment</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.Segment | |
* @generated | |
*/ | |
public Adapter createSegmentAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.Audit <em>Audit</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.Audit | |
* @generated | |
*/ | |
public Adapter createAuditAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.Stereotype <em>Stereotype</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.Stereotype | |
* @generated | |
*/ | |
public Adapter createStereotypeAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.TagDefinition <em>Tag Definition</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.TagDefinition | |
* @generated | |
*/ | |
public Adapter createTagDefinitionAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.ExtensionFamily <em>Extension Family</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.ExtensionFamily | |
* @generated | |
*/ | |
public Adapter createExtensionFamilyAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.ExtendedValue <em>Extended Value</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.ExtendedValue | |
* @generated | |
*/ | |
public Adapter createExtendedValueAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.TaggedValue <em>Tagged Value</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.TaggedValue | |
* @generated | |
*/ | |
public Adapter createTaggedValueAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.TaggedRef <em>Tagged Ref</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.TaggedRef | |
* @generated | |
*/ | |
public Adapter createTaggedRefAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.Attribute <em>Attribute</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.Attribute | |
* @generated | |
*/ | |
public Adapter createAttributeAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.kdm.Annotation <em>Annotation</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.kdm.Annotation | |
* @generated | |
*/ | |
public Adapter createAnnotationAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.core.Element <em>Element</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.core.Element | |
* @generated | |
*/ | |
public Adapter createElementAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.omg.kdm.core.ModelElement <em>Model Element</em>}'. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null so that we can easily ignore cases; | |
* it's useful to ignore a case when inheritance will catch all the cases anyway. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @see org.eclipse.gmt.modisco.omg.kdm.core.ModelElement | |
* @generated | |
*/ | |
public Adapter createModelElementAdapter() { | |
return null; | |
} | |
/** | |
* Creates a new adapter for the default case. | |
* <!-- begin-user-doc --> | |
* This default implementation returns null. | |
* <!-- end-user-doc --> | |
* @return the new adapter. | |
* @generated | |
*/ | |
public Adapter createEObjectAdapter() { | |
return null; | |
} | |
} //KdmAdapterFactory |