/*
* Copyright (c) 2013, 2016 Eike Stepper (Berlin, Germany) 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:
* Eike Stepper - initial API and implementation
*/
package org.eclipse.emf.cdo.expressions.impl;
import org.eclipse.emf.cdo.expressions.EvaluationContext;
import org.eclipse.emf.cdo.expressions.ExpressionsPackage;
import org.eclipse.emf.cdo.expressions.Value;
import org.eclipse.emf.internal.cdo.CDOObjectImpl;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import java.lang.reflect.InvocationTargetException;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Primitive Value</b></em>'.
* <!-- end-user-doc -->
*
* @generated
*/
public abstract class ValueImpl extends CDOObjectImpl implements Value
{
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ValueImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return ExpressionsPackage.Literals.VALUE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected int eStaticFeatureCount()
{
return 0;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public abstract Object getLiteral();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public Object evaluate(EvaluationContext context)
{
return getLiteral();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException
{
switch (operationID)
{
case ExpressionsPackage.VALUE___GET_LITERAL:
return getLiteral();
case ExpressionsPackage.VALUE___EVALUATE__EVALUATIONCONTEXT:
return evaluate((EvaluationContext)arguments.get(0));
}
return super.eInvoke(operationID, arguments);
}
} // PrimitiveValueImpl