blob: 139db67a28aaa8f7ad7e35b34afc34ed329caf6b [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: QVTTemplateAdapterFactory.java,v 1.2 2009/02/17 21:44:20 ewillink Exp $
*/
package org.eclipse.qvt.declarative.ecore.QVTTemplate.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.EModelElement;
import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.ETypedElement;
import org.eclipse.ocl.expressions.LiteralExp;
import org.eclipse.ocl.expressions.OCLExpression;
import org.eclipse.ocl.utilities.ASTNode;
import org.eclipse.ocl.utilities.TypedElement;
import org.eclipse.ocl.utilities.Visitable;
import org.eclipse.qvt.declarative.ecore.QVTTemplate.*;
/**
* <!-- 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.ecore.QVTTemplate.QVTTemplatePackage
* @generated
*/
public class QVTTemplateAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static QVTTemplatePackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public QVTTemplateAdapterFactory() {
if (modelPackage == null) {
modelPackage = QVTTemplatePackage.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 QVTTemplateSwitch<Adapter> modelSwitch =
new QVTTemplateSwitch<Adapter>() {
@Override
public Adapter caseTemplateExp(TemplateExp object) {
return createTemplateExpAdapter();
}
@Override
public Adapter caseObjectTemplateExp(ObjectTemplateExp object) {
return createObjectTemplateExpAdapter();
}
@Override
public Adapter caseCollectionTemplateExp(CollectionTemplateExp object) {
return createCollectionTemplateExpAdapter();
}
@Override
public Adapter casePropertyTemplateItem(PropertyTemplateItem object) {
return createPropertyTemplateItemAdapter();
}
@Override
public Adapter caseEModelElement(EModelElement object) {
return createEModelElementAdapter();
}
@Override
public Adapter caseENamedElement(ENamedElement object) {
return createENamedElementAdapter();
}
@Override
public Adapter caseETypedElement(ETypedElement object) {
return createETypedElementAdapter();
}
@Override
public <C> Adapter caseTypedElement(TypedElement<C> object) {
return createTypedElementAdapter();
}
@Override
public Adapter caseVisitable(Visitable object) {
return createVisitableAdapter();
}
@Override
public Adapter caseASTNode(ASTNode object) {
return createASTNodeAdapter();
}
@Override
public <C> Adapter caseOCLExpression(OCLExpression<C> object) {
return createOCLExpressionAdapter();
}
@Override
public Adapter caseEcore_OCLExpression(org.eclipse.ocl.ecore.OCLExpression object) {
return createEcore_OCLExpressionAdapter();
}
@Override
public <C> Adapter caseLiteralExp(LiteralExp<C> object) {
return createLiteralExpAdapter();
}
@Override
public Adapter caseEcore_LiteralExp(org.eclipse.ocl.ecore.LiteralExp object) {
return createEcore_LiteralExpAdapter();
}
@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.ecore.QVTTemplate.TemplateExp <em>Template Exp</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.ecore.QVTTemplate.TemplateExp
* @generated
*/
public Adapter createTemplateExpAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.ecore.QVTTemplate.ObjectTemplateExp <em>Object Template Exp</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.ecore.QVTTemplate.ObjectTemplateExp
* @generated
*/
public Adapter createObjectTemplateExpAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.ecore.QVTTemplate.CollectionTemplateExp <em>Collection Template Exp</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.ecore.QVTTemplate.CollectionTemplateExp
* @generated
*/
public Adapter createCollectionTemplateExpAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvt.declarative.ecore.QVTTemplate.PropertyTemplateItem <em>Property Template Item</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.ecore.QVTTemplate.PropertyTemplateItem
* @generated
*/
public Adapter createPropertyTemplateItemAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EModelElement <em>EModel 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.emf.ecore.EModelElement
* @generated
*/
public Adapter createEModelElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.ENamedElement <em>ENamed 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.emf.ecore.ENamedElement
* @generated
*/
public Adapter createENamedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.ETypedElement <em>ETyped 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.emf.ecore.ETypedElement
* @generated
*/
public Adapter createETypedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.ocl.utilities.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.ocl.utilities.TypedElement
* @generated
*/
public Adapter createTypedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.ocl.utilities.Visitable <em>Visitable</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.ocl.utilities.Visitable
* @generated
*/
public Adapter createVisitableAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.ocl.utilities.ASTNode <em>AST Node</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.ocl.utilities.ASTNode
* @generated
*/
public Adapter createASTNodeAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.ocl.expressions.OCLExpression <em>OCL Expression</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.ocl.expressions.OCLExpression
* @generated
*/
public Adapter createOCLExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.ocl.ecore.OCLExpression <em>OCL Expression</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.ocl.ecore.OCLExpression
* @generated
*/
public Adapter createEcore_OCLExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.ocl.expressions.LiteralExp <em>Literal Exp</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.ocl.expressions.LiteralExp
* @generated
*/
public Adapter createLiteralExpAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.ocl.ecore.LiteralExp <em>Literal Exp</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.ocl.ecore.LiteralExp
* @generated
*/
public Adapter createEcore_LiteralExpAdapter() {
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;
}
} //QVTTemplateAdapterFactory