blob: cf3da2bc1f1d9ba5c89dcc21b4ab6f13568e571f [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2015 Willink Transformations 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
*******************************************************************************/
/**
*/
package example1.target.util;
import example1.target.*;
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 example1.target.A;
import example1.target.A1;
import example1.target.A2;
import example1.target.A3;
import example1.target.B;
import example1.target.C;
import example1.target.D;
import example1.target.NamedElement;
import example1.target.TRoot;
import example1.target.TargetPackage;
/**
* <!-- 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 example1.target.TargetPackage
* @generated
*/
public class TargetAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static TargetPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TargetAdapterFactory() {
if (modelPackage == null) {
modelPackage = TargetPackage.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 TargetSwitch<Adapter> modelSwitch =
new TargetSwitch<Adapter>() {
@Override
public Adapter caseA(A object) {
return createAAdapter();
}
@Override
public Adapter caseA1(A1 object) {
return createA1Adapter();
}
@Override
public Adapter caseA2(A2 object) {
return createA2Adapter();
}
@Override
public Adapter caseA3(A3 object) {
return createA3Adapter();
}
@Override
public Adapter caseB(B object) {
return createBAdapter();
}
@Override
public Adapter caseC(C object) {
return createCAdapter();
}
@Override
public Adapter caseD(D object) {
return createDAdapter();
}
@Override
public Adapter caseTRoot(TRoot object) {
return createTRootAdapter();
}
@Override
public Adapter caseNamedElement(NamedElement object) {
return createNamedElementAdapter();
}
@Override
public Adapter caseNamespace(Namespace object) {
return createNamespaceAdapter();
}
@Override
public Adapter caseVisitable(Visitable object) {
return createVisitableAdapter();
}
@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 example1.target.A <em>A</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 example1.target.A
* @generated
*/
public Adapter createAAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link example1.target.A1 <em>A1</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 example1.target.A1
* @generated
*/
public Adapter createA1Adapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link example1.target.A2 <em>A2</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 example1.target.A2
* @generated
*/
public Adapter createA2Adapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link example1.target.A3 <em>A3</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 example1.target.A3
* @generated
*/
public Adapter createA3Adapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link example1.target.B <em>B</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 example1.target.B
* @generated
*/
public Adapter createBAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link example1.target.C <em>C</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 example1.target.C
* @generated
*/
public Adapter createCAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link example1.target.D <em>D</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 example1.target.D
* @generated
*/
public Adapter createDAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link example1.target.TRoot <em>TRoot</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 example1.target.TRoot
* @generated
*/
public Adapter createTRootAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link example1.target.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 example1.target.NamedElement
* @generated
*/
public Adapter createNamedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link example1.target.Namespace <em>Namespace</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 example1.target.Namespace
* @generated
*/
public Adapter createNamespaceAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link example1.target.util.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 example1.target.util.Visitable
* @generated
*/
public Adapter createVisitableAdapter() {
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;
}
} //TargetAdapterFactory