blob: d455081ab3b46618d515a156222d644ddf8d2d37 [file] [log] [blame]
/**
* <copyright>
*
* Copyright (c) 2007, 2008 E.D.Willink and others.
* 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:
* E.D.Willink - initial API and implementation
*
* </copyright>
*
* $Id: EMOFAdapterFactory.java,v 1.1 2008/07/23 09:55:17 qglineur Exp $
*/
package org.eclipse.qvt.declarative.emof.EMOF.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.qvt.declarative.emof.EMOF.Comment;
import org.eclipse.qvt.declarative.emof.EMOF.DataType;
import org.eclipse.qvt.declarative.emof.EMOF.EMOFPackage;
import org.eclipse.qvt.declarative.emof.EMOF.Element;
import org.eclipse.qvt.declarative.emof.EMOF.Enumeration;
import org.eclipse.qvt.declarative.emof.EMOF.EnumerationLiteral;
import org.eclipse.qvt.declarative.emof.EMOF.Extent;
import org.eclipse.qvt.declarative.emof.EMOF.Factory;
import org.eclipse.qvt.declarative.emof.EMOF.MultiplicityElement;
import org.eclipse.qvt.declarative.emof.EMOF.NamedElement;
import org.eclipse.qvt.declarative.emof.EMOF.Operation;
import org.eclipse.qvt.declarative.emof.EMOF.Parameter;
import org.eclipse.qvt.declarative.emof.EMOF.PrimitiveType;
import org.eclipse.qvt.declarative.emof.EMOF.Property;
import org.eclipse.qvt.declarative.emof.EMOF.ReflectiveCollection;
import org.eclipse.qvt.declarative.emof.EMOF.ReflectiveSequence;
import org.eclipse.qvt.declarative.emof.EMOF.Tag;
import org.eclipse.qvt.declarative.emof.EMOF.Type;
import org.eclipse.qvt.declarative.emof.EMOF.TypedElement;
import org.eclipse.qvt.declarative.emof.EMOF.URIExtent;
/**
* <!-- 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.qvt.declarative.emof.EMOF.EMOFPackage
* @generated
*/
public class EMOFAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static EMOFPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EMOFAdapterFactory() {
if (modelPackage == null) {
modelPackage = EMOFPackage.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(Object object) {
if (object == modelPackage) {
return true;
}
if (object instanceof EObject) {
return ((EObject)object).eClass().getEPackage() == modelPackage;
}
return false;
}
/**
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EMOFSwitch<Adapter> modelSwitch =
new EMOFSwitch<Adapter>() {
@Override
public Adapter caseClass(org.eclipse.qvt.declarative.emof.EMOF.Class object) {
return createClassAdapter();
}
@Override
public Adapter caseComment(Comment object) {
return createCommentAdapter();
}
@Override
public Adapter caseDataType(DataType object) {
return createDataTypeAdapter();
}
@Override
public Adapter caseElement(Element object) {
return createElementAdapter();
}
@Override
public Adapter caseEnumeration(Enumeration object) {
return createEnumerationAdapter();
}
@Override
public Adapter caseEnumerationLiteral(EnumerationLiteral object) {
return createEnumerationLiteralAdapter();
}
@Override
public Adapter caseExtent(Extent object) {
return createExtentAdapter();
}
@Override
public Adapter caseFactory(Factory object) {
return createFactoryAdapter();
}
@Override
public Adapter caseMultiplicityElement(MultiplicityElement object) {
return createMultiplicityElementAdapter();
}
@Override
public Adapter caseNamedElement(NamedElement object) {
return createNamedElementAdapter();
}
@Override
public Adapter caseObject(org.eclipse.qvt.declarative.emof.EMOF.Object object) {
return createObjectAdapter();
}
@Override
public Adapter caseOperation(Operation object) {
return createOperationAdapter();
}
@Override
public Adapter casePackage(org.eclipse.qvt.declarative.emof.EMOF.Package object) {
return createPackageAdapter();
}
@Override
public Adapter caseParameter(Parameter object) {
return createParameterAdapter();
}
@Override
public Adapter casePrimitiveType(PrimitiveType object) {
return createPrimitiveTypeAdapter();
}
@Override
public Adapter caseProperty(Property object) {
return createPropertyAdapter();
}
@Override
public Adapter caseReflectiveCollection(ReflectiveCollection object) {
return createReflectiveCollectionAdapter();
}
@Override
public Adapter caseReflectiveSequence(ReflectiveSequence object) {
return createReflectiveSequenceAdapter();
}
@Override
public Adapter caseTag(Tag object) {
return createTagAdapter();
}
@Override
public Adapter caseType(Type object) {
return createTypeAdapter();
}
@Override
public Adapter caseTypedElement(TypedElement object) {
return createTypedElementAdapter();
}
@Override
public Adapter caseURIExtent(URIExtent object) {
return createURIExtentAdapter();
}
@Override
public Adapter defaultCase(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(Notifier target) {
return modelSwitch.doSwitch((EObject)target);
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Class <em>Class</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.qvt.declarative.emof.EMOF.Class
* @generated
*/
public Adapter createClassAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Comment <em>Comment</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.qvt.declarative.emof.EMOF.Comment
* @generated
*/
public Adapter createCommentAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.DataType <em>Data Type</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.qvt.declarative.emof.EMOF.DataType
* @generated
*/
public Adapter createDataTypeAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.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.qvt.declarative.emof.EMOF.Element
* @generated
*/
public Adapter createElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Enumeration <em>Enumeration</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.qvt.declarative.emof.EMOF.Enumeration
* @generated
*/
public Adapter createEnumerationAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.EnumerationLiteral <em>Enumeration Literal</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.qvt.declarative.emof.EMOF.EnumerationLiteral
* @generated
*/
public Adapter createEnumerationLiteralAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Extent <em>Extent</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.qvt.declarative.emof.EMOF.Extent
* @generated
*/
public Adapter createExtentAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Factory <em>Factory</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.qvt.declarative.emof.EMOF.Factory
* @generated
*/
public Adapter createFactoryAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.MultiplicityElement <em>Multiplicity 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.qvt.declarative.emof.EMOF.MultiplicityElement
* @generated
*/
public Adapter createMultiplicityElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.NamedElement <em>Named 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.qvt.declarative.emof.EMOF.NamedElement
* @generated
*/
public Adapter createNamedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Object <em>Object</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.qvt.declarative.emof.EMOF.Object
* @generated
*/
public Adapter createObjectAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Operation <em>Operation</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.qvt.declarative.emof.EMOF.Operation
* @generated
*/
public Adapter createOperationAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Package <em>Package</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.qvt.declarative.emof.EMOF.Package
* @generated
*/
public Adapter createPackageAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Parameter <em>Parameter</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.qvt.declarative.emof.EMOF.Parameter
* @generated
*/
public Adapter createParameterAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.PrimitiveType <em>Primitive Type</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.qvt.declarative.emof.EMOF.PrimitiveType
* @generated
*/
public Adapter createPrimitiveTypeAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Property <em>Property</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.qvt.declarative.emof.EMOF.Property
* @generated
*/
public Adapter createPropertyAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.ReflectiveCollection <em>Reflective Collection</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.qvt.declarative.emof.EMOF.ReflectiveCollection
* @generated
*/
public Adapter createReflectiveCollectionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.ReflectiveSequence <em>Reflective Sequence</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.qvt.declarative.emof.EMOF.ReflectiveSequence
* @generated
*/
public Adapter createReflectiveSequenceAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Tag <em>Tag</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.qvt.declarative.emof.EMOF.Tag
* @generated
*/
public Adapter createTagAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.Type <em>Type</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.qvt.declarative.emof.EMOF.Type
* @generated
*/
public Adapter createTypeAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.TypedElement <em>Typed 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.qvt.declarative.emof.EMOF.TypedElement
* @generated
*/
public Adapter createTypedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.emof.EMOF.URIExtent <em>URI Extent</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.qvt.declarative.emof.EMOF.URIExtent
* @generated
*/
public Adapter createURIExtentAdapter() {
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;
}
} //EMOFAdapterFactory