| /******************************************************************************* |
| * Copyright (c) 2014, 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 |
| *******************************************************************************/ |
| /** |
| */ |
| package org.eclipse.ocl.pivot.oclstdlib.util; |
| |
| import java.util.Collection; |
| import java.util.List; |
| import java.util.Map; |
| import java.util.Set; |
| |
| 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.ocl.pivot.oclstdlib.*; |
| import org.eclipse.ocl.pivot.oclstdlib.OCLstdlibPackage; |
| import org.eclipse.ocl.pivot.values.Bag; |
| import org.eclipse.ocl.pivot.values.OrderedSet; |
| |
| /** |
| * <!-- 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.ocl.pivot.oclstdlib.OCLstdlibPackage |
| * @generated |
| */ |
| public class OCLstdlibAdapterFactory extends AdapterFactoryImpl { |
| /** |
| * The cached model package. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected static OCLstdlibPackage modelPackage; |
| |
| /** |
| * Creates an instance of the adapter factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public OCLstdlibAdapterFactory() { |
| if (modelPackage == null) { |
| modelPackage = OCLstdlibPackage.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 OCLstdlibSwitch<@Nullable Adapter> modelSwitch = |
| new OCLstdlibSwitch<@Nullable Adapter>() { |
| @Override |
| public <T> Adapter caseBag(Bag<T> object) { |
| return createBagAdapter(); |
| } |
| @Override |
| public <T> Adapter caseCollection(Collection<T> object) { |
| return createCollectionAdapter(); |
| } |
| @Override |
| public <K, V> Adapter caseMap(Map<K, V> object) { |
| return createMapAdapter(); |
| } |
| @Override |
| public Adapter caseOclAny(Object object) { |
| return createOclAnyAdapter(); |
| } |
| @Override |
| public Adapter caseOclComparable(Object object) { |
| return createOclComparableAdapter(); |
| } |
| @Override |
| public Adapter caseOclElement(Object object) { |
| return createOclElementAdapter(); |
| } |
| @Override |
| public Adapter caseOclEnumeration(Object object) { |
| return createOclEnumerationAdapter(); |
| } |
| @Override |
| public Adapter caseOclInvalid(Object object) { |
| return createOclInvalidAdapter(); |
| } |
| @Override |
| public Adapter caseOclLambda(Object object) { |
| return createOclLambdaAdapter(); |
| } |
| @Override |
| public Adapter caseOclMessage(Object object) { |
| return createOclMessageAdapter(); |
| } |
| @Override |
| public Adapter caseOclSelf(Object object) { |
| return createOclSelfAdapter(); |
| } |
| @Override |
| public Adapter caseOclState(Object object) { |
| return createOclStateAdapter(); |
| } |
| @Override |
| public Adapter caseOclStereotype(Object object) { |
| return createOclStereotypeAdapter(); |
| } |
| @Override |
| public Adapter caseOclSummable(Object object) { |
| return createOclSummableAdapter(); |
| } |
| @Override |
| public Adapter caseOclTuple(Object object) { |
| return createOclTupleAdapter(); |
| } |
| @Override |
| public Adapter caseOclType(Object object) { |
| return createOclTypeAdapter(); |
| } |
| @Override |
| public Adapter caseOclVoid(Object object) { |
| return createOclVoidAdapter(); |
| } |
| @Override |
| public <T> Adapter caseOrderedCollection(Collection<T> object) { |
| return createOrderedCollectionAdapter(); |
| } |
| @Override |
| public <T> Adapter caseOrderedSet(OrderedSet<T> object) { |
| return createOrderedSetAdapter(); |
| } |
| @Override |
| public <T> Adapter caseSequence(List<T> object) { |
| return createSequenceAdapter(); |
| } |
| @Override |
| public <T> Adapter caseSet(Set<T> object) { |
| return createSetAdapter(); |
| } |
| @Override |
| public <T> Adapter caseUniqueCollection(Collection<T> object) { |
| return createUniqueCollectionAdapter(); |
| } |
| @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.ocl.pivot.values.Bag <em>Bag</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.pivot.values.Bag |
| * @generated |
| */ |
| public Adapter createBagAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.util.Collection <em>Collection</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.Collection |
| * @generated |
| */ |
| public Adapter createCollectionAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.util.Map <em>Map</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 |
| * @generated |
| */ |
| public Adapter createMapAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl Any</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclAnyAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl Comparable</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclComparableAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl 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 java.lang.Object |
| * @generated |
| */ |
| public Adapter createOclElementAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl Enumeration</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclEnumerationAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl Invalid</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclInvalidAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl Lambda</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclLambdaAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl Message</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclMessageAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl Self</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclSelfAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl State</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclStateAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl Stereotype</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclStereotypeAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl Summable</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclSummableAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl Tuple</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclTupleAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl 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 java.lang.Object |
| * @generated |
| */ |
| public Adapter createOclTypeAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.lang.Object <em>Ocl Void</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.lang.Object |
| * @generated |
| */ |
| public Adapter createOclVoidAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.util.Collection <em>Ordered Collection</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.Collection |
| * @generated |
| */ |
| public Adapter createOrderedCollectionAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link org.eclipse.ocl.pivot.values.OrderedSet <em>Ordered Set</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.pivot.values.OrderedSet |
| * @generated |
| */ |
| public Adapter createOrderedSetAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.util.List <em>Sequence</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.List |
| * @generated |
| */ |
| public Adapter createSequenceAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.util.Set <em>Set</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.Set |
| * @generated |
| */ |
| public Adapter createSetAdapter() { |
| return null; |
| } |
| |
| /** |
| * Creates a new adapter for an object of class '{@link java.util.Collection <em>Unique Collection</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.Collection |
| * @generated |
| */ |
| public Adapter createUniqueCollectionAdapter() { |
| 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; |
| } |
| |
| } //OCLstdlibAdapterFactory |