blob: 7edfeeafcf589cfd489de9a09637582075949da8 [file] [log] [blame]
/**
* *******************************************************************************
* Copyright (c) 2009 Mia-Software.
* 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:
*
* Fabien Giquel (Mia-Software) - initial API and implementation
* *******************************************************************************
*/
package org.eclipse.gmt.modisco.xml.emf.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.xml.Attribute;
import org.eclipse.gmt.modisco.xml.CDATA;
import org.eclipse.gmt.modisco.xml.Comment;
import org.eclipse.gmt.modisco.xml.DocumentTypeDeclaration;
import org.eclipse.gmt.modisco.xml.Element;
import org.eclipse.gmt.modisco.xml.Namespace;
import org.eclipse.gmt.modisco.xml.Node;
import org.eclipse.gmt.modisco.xml.ProcessingInstruction;
import org.eclipse.gmt.modisco.xml.Root;
import org.eclipse.gmt.modisco.xml.Text;
import org.eclipse.gmt.modisco.xml.emf.MoDiscoXMLPackage;
/**
* <!-- 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.xml.emf.MoDiscoXMLPackage
* @generated
*/
@SuppressWarnings("all")
public class MoDiscoXMLAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static MoDiscoXMLPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MoDiscoXMLAdapterFactory() {
if (MoDiscoXMLAdapterFactory.modelPackage == null) {
MoDiscoXMLAdapterFactory.modelPackage = MoDiscoXMLPackage.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 == MoDiscoXMLAdapterFactory.modelPackage) {
return true;
}
if (object instanceof EObject) {
return ((EObject)object).eClass().getEPackage() == MoDiscoXMLAdapterFactory.modelPackage;
}
return false;
}
/**
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MoDiscoXMLSwitch<Adapter> modelSwitch =
new MoDiscoXMLSwitch<Adapter>() {
@Override
public Adapter caseNode(final Node object) {
return createNodeAdapter();
}
@Override
public Adapter caseAttribute(final Attribute object) {
return createAttributeAdapter();
}
@Override
public Adapter caseText(final Text object) {
return createTextAdapter();
}
@Override
public Adapter caseElement(final Element object) {
return createElementAdapter();
}
@Override
public Adapter caseRoot(final Root object) {
return createRootAdapter();
}
@Override
public Adapter caseNamespace(final Namespace object) {
return createNamespaceAdapter();
}
@Override
public Adapter caseComment(final Comment object) {
return createCommentAdapter();
}
@Override
public Adapter caseDocumentTypeDeclaration(final DocumentTypeDeclaration object) {
return createDocumentTypeDeclarationAdapter();
}
@Override
public Adapter caseCDATA(final CDATA object) {
return createCDATAAdapter();
}
@Override
public Adapter caseProcessingInstruction(final ProcessingInstruction object) {
return createProcessingInstructionAdapter();
}
@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.xml.Node <em>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.gmt.modisco.xml.Node
* @generated
*/
public Adapter createNodeAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.xml.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.xml.Attribute
* @generated
*/
public Adapter createAttributeAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.xml.Text <em>Text</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.xml.Text
* @generated
*/
public Adapter createTextAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.xml.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.xml.Element
* @generated
*/
public Adapter createElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.xml.Root <em>Root</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.xml.Root
* @generated
*/
public Adapter createRootAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.xml.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 org.eclipse.gmt.modisco.xml.Namespace
* @generated
*/
public Adapter createNamespaceAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.xml.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.gmt.modisco.xml.Comment
* @generated
*/
public Adapter createCommentAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.xml.DocumentTypeDeclaration <em>Document Type Declaration</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.xml.DocumentTypeDeclaration
* @generated
*/
public Adapter createDocumentTypeDeclarationAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.xml.CDATA <em>CDATA</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.xml.CDATA
* @generated
*/
public Adapter createCDATAAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.gmt.modisco.xml.ProcessingInstruction <em>Processing Instruction</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.xml.ProcessingInstruction
* @generated
*/
public Adapter createProcessingInstructionAdapter() {
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;
}
} //MoDiscoXMLAdapterFactory