blob: 7f8774f7f918117a4e5bce74cb2eaeab096f92d2 [file] [log] [blame]
package org.eclipse.stem.core.predicate.util;
/*******************************************************************************
* Copyright (c) 2008 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 Corporation - initial API and implementation
*******************************************************************************/
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.stem.core.common.Identifiable;
import org.eclipse.stem.core.predicate.And;
import org.eclipse.stem.core.predicate.BooleanExpression;
import org.eclipse.stem.core.predicate.BooleanOperator;
import org.eclipse.stem.core.predicate.ElapsedTimeTest;
import org.eclipse.stem.core.predicate.False;
import org.eclipse.stem.core.predicate.IdentifiablePredicate;
import org.eclipse.stem.core.predicate.IdentifiablePredicateExpression;
import org.eclipse.stem.core.predicate.IdentifiableTest;
import org.eclipse.stem.core.predicate.NaryBooleanOperator;
import org.eclipse.stem.core.predicate.Not;
import org.eclipse.stem.core.predicate.Or;
import org.eclipse.stem.core.predicate.Predicate;
import org.eclipse.stem.core.predicate.PredicateExpression;
import org.eclipse.stem.core.predicate.PredicatePackage;
import org.eclipse.stem.core.predicate.PredicateReference;
import org.eclipse.stem.core.predicate.Test;
import org.eclipse.stem.core.predicate.TimeTest;
import org.eclipse.stem.core.predicate.True;
import org.eclipse.stem.core.predicate.UnaryBooleanOperator;
/**
* <!-- 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.stem.core.predicate.PredicatePackage
* @generated
*/
public class PredicateAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static PredicatePackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PredicateAdapterFactory() {
if (modelPackage == null) {
modelPackage = PredicatePackage.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 PredicateSwitch<Adapter> modelSwitch =
new PredicateSwitch<Adapter>() {
@Override
public Adapter caseAnd(And object) {
return createAndAdapter();
}
@Override
public Adapter caseBooleanExpression(BooleanExpression object) {
return createBooleanExpressionAdapter();
}
@Override
public Adapter caseBooleanOperator(BooleanOperator object) {
return createBooleanOperatorAdapter();
}
@Override
public Adapter caseFalse(False object) {
return createFalseAdapter();
}
@Override
public Adapter caseNaryBooleanOperator(NaryBooleanOperator object) {
return createNaryBooleanOperatorAdapter();
}
@Override
public Adapter caseNot(Not object) {
return createNotAdapter();
}
@Override
public Adapter caseOr(Or object) {
return createOrAdapter();
}
@Override
public Adapter casePredicate(Predicate object) {
return createPredicateAdapter();
}
@Override
public Adapter casePredicateReference(PredicateReference object) {
return createPredicateReferenceAdapter();
}
@Override
public Adapter caseTest(Test object) {
return createTestAdapter();
}
@Override
public Adapter caseTrue(True object) {
return createTrueAdapter();
}
@Override
public Adapter caseUnaryBooleanOperator(UnaryBooleanOperator object) {
return createUnaryBooleanOperatorAdapter();
}
@Override
public Adapter casePredicateExpression(PredicateExpression object) {
return createPredicateExpressionAdapter();
}
@Override
public Adapter caseIdentifiablePredicate(IdentifiablePredicate object) {
return createIdentifiablePredicateAdapter();
}
@Override
public Adapter caseIdentifiablePredicateExpression(IdentifiablePredicateExpression object) {
return createIdentifiablePredicateExpressionAdapter();
}
@Override
public Adapter caseIdentifiableTest(IdentifiableTest object) {
return createIdentifiableTestAdapter();
}
@Override
public Adapter caseTimeTest(TimeTest object) {
return createTimeTestAdapter();
}
@Override
public Adapter caseElapsedTimeTest(ElapsedTimeTest object) {
return createElapsedTimeTestAdapter();
}
@Override
public <T> Adapter caseComparable(Comparable<T> object) {
return createComparableAdapter();
}
@Override
public Adapter caseIdentifiable(Identifiable object) {
return createIdentifiableAdapter();
}
@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.stem.core.predicate.And <em>And</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.stem.core.predicate.And
* @generated
*/
public Adapter createAndAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.BooleanExpression <em>Boolean Expression</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.stem.core.predicate.BooleanExpression
* @generated
*/
public Adapter createBooleanExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.BooleanOperator <em>Boolean Operator</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.stem.core.predicate.BooleanOperator
* @generated
*/
public Adapter createBooleanOperatorAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.False <em>False</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.stem.core.predicate.False
* @generated
*/
public Adapter createFalseAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.NaryBooleanOperator <em>Nary Boolean Operator</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.stem.core.predicate.NaryBooleanOperator
* @generated
*/
public Adapter createNaryBooleanOperatorAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.Not <em>Not</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.stem.core.predicate.Not
* @generated
*/
public Adapter createNotAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.Or <em>Or</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.stem.core.predicate.Or
* @generated
*/
public Adapter createOrAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.Predicate <em>Predicate</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.stem.core.predicate.Predicate
* @generated
*/
public Adapter createPredicateAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.PredicateReference <em>Reference</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.stem.core.predicate.PredicateReference
* @generated
*/
public Adapter createPredicateReferenceAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.Test <em>Test</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.stem.core.predicate.Test
* @generated
*/
public Adapter createTestAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.True <em>True</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.stem.core.predicate.True
* @generated
*/
public Adapter createTrueAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.UnaryBooleanOperator <em>Unary Boolean Operator</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.stem.core.predicate.UnaryBooleanOperator
* @generated
*/
public Adapter createUnaryBooleanOperatorAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.PredicateExpression <em>Expression</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.stem.core.predicate.PredicateExpression
* @generated
*/
public Adapter createPredicateExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.IdentifiablePredicate <em>Identifiable Predicate</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.stem.core.predicate.IdentifiablePredicate
* @generated
*/
public Adapter createIdentifiablePredicateAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.IdentifiablePredicateExpression <em>Identifiable Predicate Expression</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.stem.core.predicate.IdentifiablePredicateExpression
* @generated
*/
public Adapter createIdentifiablePredicateExpressionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.IdentifiableTest <em>Identifiable Test</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.stem.core.predicate.IdentifiableTest
* @generated
*/
public Adapter createIdentifiableTestAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.TimeTest <em>Time Test</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.stem.core.predicate.TimeTest
* @generated
*/
public Adapter createTimeTestAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.predicate.ElapsedTimeTest <em>Elapsed Time Test</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.stem.core.predicate.ElapsedTimeTest
* @generated
*/
public Adapter createElapsedTimeTestAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link java.lang.Comparable <em>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.Comparable
* @generated
*/
public Adapter createComparableAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.stem.core.common.Identifiable <em>Identifiable</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.stem.core.common.Identifiable
* @generated
*/
public Adapter createIdentifiableAdapter() {
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;
}
} //PredicateAdapterFactory