/**
* Copyright (c) 2002-2010 IBM Corporation 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:
* IBM - Initial API and implementation
*/
package org.eclipse.emf.ecore.util;
import java.util.Map;
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.*;
/**
* <!-- 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.emf.ecore.EcorePackage
* @generated
*/
public class EcoreAdapterFactory extends AdapterFactoryImpl
{
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static EcorePackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EcoreAdapterFactory()
{
if (modelPackage == null)
{
modelPackage = EcorePackage.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 EcoreSwitch<Adapter> modelSwitch =
new EcoreSwitch<Adapter>()
{
@Override
public Adapter caseEAttribute(EAttribute object)
{
return createEAttributeAdapter();
}
@Override
public Adapter caseEAnnotation(EAnnotation object)
{
return createEAnnotationAdapter();
}
@Override
public Adapter caseEClass(EClass object)
{
return createEClassAdapter();
}
@Override
public Adapter caseEClassifier(EClassifier object)
{
return createEClassifierAdapter();
}
@Override
public Adapter caseEDataType(EDataType object)
{
return createEDataTypeAdapter();
}
@Override
public Adapter caseEEnum(EEnum object)
{
return createEEnumAdapter();
}
@Override
public Adapter caseEEnumLiteral(EEnumLiteral object)
{
return createEEnumLiteralAdapter();
}
@Override
public Adapter caseEFactory(EFactory object)
{
return createEFactoryAdapter();
}
@Override
public Adapter caseEModelElement(EModelElement object)
{
return createEModelElementAdapter();
}
@Override
public Adapter caseENamedElement(ENamedElement object)
{
return createENamedElementAdapter();
}
@Override
public Adapter caseEOperation(EOperation object)
{
return createEOperationAdapter();
}
@Override
public Adapter caseEPackage(EPackage object)
{
return createEPackageAdapter();
}
@Override
public Adapter caseEParameter(EParameter object)
{
return createEParameterAdapter();
}
@Override
public Adapter caseEReference(EReference object)
{
return createEReferenceAdapter();
}
@Override
public Adapter caseEStructuralFeature(EStructuralFeature object)
{
return createEStructuralFeatureAdapter();
}
@Override
public Adapter caseETypedElement(ETypedElement object)
{
return createETypedElementAdapter();
}
@Override
public Adapter caseEStringToStringMapEntry(Map.Entry<String, String> object)
{
return createEStringToStringMapEntryAdapter();
}
@Override
public Adapter caseEGenericType(EGenericType object)
{
return createEGenericTypeAdapter();
}
@Override
public Adapter caseETypeParameter(ETypeParameter object)
{
return createETypeParameterAdapter();
}
@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.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.EStructuralFeature <em>EStructural Feature</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.EStructuralFeature
* @generated
*/
public Adapter createEStructuralFeatureAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EAnnotation <em>EAnnotation</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.EAnnotation
* @generated
*/
public Adapter createEAnnotationAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EAttribute <em>EAttribute</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.EAttribute
* @generated
*/
public Adapter createEAttributeAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EClass <em>EClass</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.EClass
* @generated
*/
public Adapter createEClassAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EDataType <em>EData 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.emf.ecore.EDataType
* @generated
*/
public Adapter createEDataTypeAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EClassifier <em>EClassifier</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.EClassifier
* @generated
*/
public Adapter createEClassifierAdapter()
{
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.emf.ecore.EParameter <em>EParameter</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.EParameter
* @generated
*/
public Adapter createEParameterAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EOperation <em>EOperation</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.EOperation
* @generated
*/
public Adapter createEOperationAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EPackage <em>EPackage</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.EPackage
* @generated
*/
public Adapter createEPackageAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EFactory <em>EFactory</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.EFactory
* @generated
*/
public Adapter createEFactoryAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EEnumLiteral <em>EEnum 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.emf.ecore.EEnumLiteral
* @generated
*/
public Adapter createEEnumLiteralAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EEnum <em>EEnum</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.EEnum
* @generated
*/
public Adapter createEEnumAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EReference <em>EReference</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.EReference
* @generated
*/
public Adapter createEReferenceAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>EString To String Map Entry</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 java.util.Map.Entry
* @generated
*/
public Adapter createEStringToStringMapEntryAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EGenericType <em>EGeneric 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.emf.ecore.EGenericType
* @generated
*/
public Adapter createEGenericTypeAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.ETypeParameter <em>EType 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.emf.ecore.ETypeParameter
* @generated
*/
public Adapter createETypeParameterAdapter()
{
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;
}
} //EcoreAdapterFactory