blob: e88695b5823ad7a48174376cc07a6f1960d42c03 [file] [log] [blame]
/**
* <copyright>
*
* Copyright (c) 2018, 2019 Willink Transformations and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* E.D.Willink - Initial API and implementation
*
* </copyright>
*/
package org.eclipse.qvtd.xml.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.jdt.annotation.Nullable;
import org.eclipse.qvtd.xml.*;
/**
* <!-- 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.qvtd.xml.XMLmodelPackage
* @generated
*/
public class XMLmodelAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static XMLmodelPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public XMLmodelAdapterFactory() {
if (modelPackage == null) {
modelPackage = XMLmodelPackage.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 XMLmodelSwitch<@Nullable Adapter> modelSwitch =
new XMLmodelSwitch<@Nullable Adapter>() {
@Override
public Adapter caseAttribute(Attribute object) {
return createAttributeAdapter();
}
@Override
public Adapter caseCDATA(CDATA object) {
return createCDATAAdapter();
}
@Override
public Adapter caseCharacters(Characters object) {
return createCharactersAdapter();
}
@Override
public Adapter caseClassAttribute(ClassAttribute object) {
return createClassAttributeAdapter();
}
@Override
public Adapter caseClassElement(ClassElement object) {
return createClassElementAdapter();
}
@Override
public Adapter caseComment(Comment object) {
return createCommentAdapter();
}
@Override
public Adapter caseDTD(DTD object) {
return createDTDAdapter();
}
@Override
public Adapter caseDataTypeAttribute(DataTypeAttribute object) {
return createDataTypeAttributeAdapter();
}
@Override
public Adapter caseDataTypeElement(DataTypeElement object) {
return createDataTypeElementAdapter();
}
@Override
public Adapter caseDocument(Document object) {
return createDocumentAdapter();
}
@Override
public Adapter caseElement(Element object) {
return createElementAdapter();
}
@Override
public Adapter caseEntity(Entity object) {
return createEntityAdapter();
}
@Override
public Adapter caseNode(Node object) {
return createNodeAdapter();
}
@Override
public Adapter casePrefixMapping(PrefixMapping object) {
return createPrefixMappingAdapter();
}
@Override
public Adapter caseProcessingInstruction(ProcessingInstruction object) {
return createProcessingInstructionAdapter();
}
@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.qvtd.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.qvtd.xml.Attribute
* @generated
*/
public Adapter createAttributeAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.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.qvtd.xml.CDATA
* @generated
*/
public Adapter createCDATAAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.xml.Characters <em>Characters</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.qvtd.xml.Characters
* @generated
*/
public Adapter createCharactersAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.xml.ClassAttribute <em>Class 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.qvtd.xml.ClassAttribute
* @generated
*/
public Adapter createClassAttributeAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.xml.ClassElement <em>Class 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.qvtd.xml.ClassElement
* @generated
*/
public Adapter createClassElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.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.qvtd.xml.Comment
* @generated
*/
public Adapter createCommentAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.xml.DTD <em>DTD</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.qvtd.xml.DTD
* @generated
*/
public Adapter createDTDAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.xml.DataTypeAttribute <em>Data Type 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.qvtd.xml.DataTypeAttribute
* @generated
*/
public Adapter createDataTypeAttributeAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.xml.DataTypeElement <em>Data Type 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.qvtd.xml.DataTypeElement
* @generated
*/
public Adapter createDataTypeElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.xml.Document <em>Document</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.qvtd.xml.Document
* @generated
*/
public Adapter createDocumentAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.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.qvtd.xml.Element
* @generated
*/
public Adapter createElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.xml.Entity <em>Entity</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.qvtd.xml.Entity
* @generated
*/
public Adapter createEntityAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.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.qvtd.xml.Node
* @generated
*/
public Adapter createNodeAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.xml.PrefixMapping <em>Prefix Mapping</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.qvtd.xml.PrefixMapping
* @generated
*/
public Adapter createPrefixMappingAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.qvtd.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.qvtd.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;
}
} //XMLmodelAdapterFactory